[codex] Fix Fitbit live redirect URI#497
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR fixes the Fitbit OAuth redirect URI in the adapter registry to match the exact value registered in the Fitbit dev console (
Confidence Score: 5/5Safe to merge — all three changed files make targeted, well-tested corrections with no logic regressions. The adapter registry change precisely replaces the previously incorrect URIs with the exact Fitbit-registered value. The pickRedirectUri function's byOrigin fallback correctly returns https://app.getbased.health for any path under that origin, and the updated test suite verifies the new URI is present, the picker returns it, and the removed variants are absent. The version bump follows the project's documented cache-busting pattern. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant App as App (app.getbased.health)
participant pickRedirectUri as pickRedirectUri()
participant FitbitAuth as Fitbit Auth Server
App->>pickRedirectUri: registeredUris, window.location
Note over pickRedirectUri: origin = "https://app.getbased.health"<br/>hrefBase = origin + pathname ("/app")
pickRedirectUri-->>pickRedirectUri: exact match ("https://app.getbased.health/app")? no (removed)
pickRedirectUri-->>pickRedirectUri: "byOrigin: uri.startsWith(origin)?<br/>"https://app.getbased.health" ✓"
pickRedirectUri->>App: returns "https://app.getbased.health"
App->>FitbitAuth: "/oauth2/authorize?redirect_uri=https://app.getbased.health&..."
FitbitAuth-->>App: "302 → https://app.getbased.health?code=xxx&state=yyy"
App->>App: completeOAuthCallback(urlParams)
Reviews (1): Last reviewed commit: "Fix Fitbit live redirect URI" | Re-trigger Greptile |
Summary
https://app.getbased.healthhttps://app.getbased.health/andhttps://app.getbased.health/appfrom the Fitbit registrygetbased.health/app, and beta redirect entries aligned with the configured Fitbit accountversion.jsto invalidate the cached adapter registryValidation
node tests/test-wearables.jsgit diff --checkhttps://app.getbased.healthreturns the app shell for the callback target