Skip to content

login: pin discovery app-version as documented constant; explain no-Auth0 failure - #27

Merged
NovaLux12 merged 1 commit into
mainfrom
docs/discovery-version-guard
Jul 19, 2026
Merged

NovaLux12 merged 1 commit into
mainfrom
docs/discovery-version-guard

Conversation

@NovaLux12

Copy link
Copy Markdown
Owner

What does this PR do?

Public-facing compatibility research finding. Medtronic's discovery endpoint returns a different config per app-version string — verified by fetching all of them unauthenticated (these are the same public configs the app requests on startup):

discover/android/X baseUrlCumulus Auth0 SSO config
3.4 v11 ❌ none (legacy OAuth)
3.6 / 3.7 v13 ✅ present (what the app + this bridge use)
4.0 v2 ❌ none

So the 3.6 in our discovery URL is load-bearing, not cosmetic: a future "bump to a newer number" would silently land on a no-Auth0 config and break login with an opaque error. This extracts it to a DISCOVERY_APP_VERSION constant with a comment recording the finding, and rewrites the no-SSO-URL error to name the version string as the likely cause. No behavioural change on the happy path (still android/3.6).

Related issue

Follows the auth-flow research on #12. No functional change to the working flow.

Type of change

  • Bug fix (non-breaking change that fixes an issue) — hardening + diagnostics

How was this tested?

  • npm test passes locally (42/42)
  • npx tsc --noEmit passes locally
  • Tested against mocked fixtures only

The version→config mapping was verified against live public discovery responses; no credentials or authenticated calls involved.

Upstream relationship

  • No divergence — the change is also applicable to (or already submitted to) upstream

Checklist

  • My change matches the contribution guidelines in CONTRIBUTING.md
  • I haven't introduced new dependencies without justification
  • I've added tests for the behaviour change (n/a — constant extraction + error text; happy path unchanged and covered)
  • I've updated relevant docs (CHANGELOG.md [Unreleased])

Security

  • No credentials, tokens, or logindata.json content is included in this PR
  • No new external network calls without justification
  • No patient-identifying data is included (sample IDs, care-partner usernames, etc.)

🤖 Generated with Claude Code

…uth0 failure

Live discovery probing (2026-07-19) showed Medtronic returns a different
config per app-version string: 3.4 -> cumulus v11/no-Auth0, 3.6/3.7 ->
v13/Auth0, 4.0 -> v2/no-Auth0. The version we send is therefore load-bearing,
not cosmetic — bumping it to a higher-looking number drops onto a config with
no Auth0 SSO URL and breaks login. Extract it to DISCOVERY_APP_VERSION with a
comment recording this, and make the no-SSO-URL error name the version as the
likely cause instead of failing opaquely.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NovaLux12
NovaLux12 merged commit 9df6ece into main Jul 19, 2026
2 checks passed
@NovaLux12
NovaLux12 deleted the docs/discovery-version-guard branch July 19, 2026 21:27
@NovaLux12 NovaLux12 mentioned this pull request Jul 19, 2026
11 of 12 tasks
NovaLux12 added a commit that referenced this pull request Jul 19, 2026
Bump version and roll the CHANGELOG [Unreleased] block into a dated 0.1.6
section per the release checklist. Bundles the doctor pre-flight check (#28)
and the discovery app-version guard (#27).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant