v0.1.5 — server-reported username for data requests
One fix from round 2 of the auth-flow research (findings), which validated the bridge's login-page scraping against Medtronic's live Auth0 Universal Login and cross-checked data fetching against nightscout-connect.
Fix
- Data POST bodies now use the username CareLink reports from
/users/merather thanCARELINK_USERNAMEverbatim (#25). If you enter your email in.envwhile your CareLink username differs, previous versions sent the wrong identifier on every BLE/carepartner data request. Both reference implementations source the username from the server/token; the bridge now does too, with the configured value as fallback. A verbose-mode log notes when the two differ.
Research conclusions shipped as documentation (no code change)
- Strategy 1 (automated login) assumptions validated against the live Auth0 New Universal Login page: field names, hidden
state,action=defaultsubmit, and the form-action fallback all match. CAPTCHA is present but dormant (no active siteKey); wrong-credential string detection is untestable without a real failed login. - Both CareLink API families are alive; nightscout-connect uses the same patient-portal endpoints with plain Bearer auth — de-risking the endpoint-family watch item.
- US SSO config verified structurally identical (own client_id/audience); v13 confirmed as current API generation; GB→EU mapping confirmed.
42/42 tests on Node 20 + 22. No new dependencies.