Use browser headers on login POST and MFA verify#216
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdded Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #216 +/- ##
=======================================
Coverage 99.91% 99.91%
=======================================
Files 68 68
Lines 3569 3569
=======================================
Hits 3566 3566
Misses 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@matin PTAL, this should fix at least the 429 issues the people are observing |
Cloudflare detects the User-Agent switch between the sign-in page (browser UA) and the login POST (GCM-iOS UA) and returns 429. Use SSO_PAGE_HEADERS on both API calls to stay consistent.
fa6f2b6 to
464c1b5
Compare
|
fixes 429 issue for me, now Im able to enter MFA again, but then it fails with 401 Client Error: Unauthorized for url: https://connectapi.garmin.com/oauth-service/oauth/preauthorized?ticket=ST-0204117-QsqjGSiIEdagLgEdqPHa-sso&login-url=https://mobile.integration.garmin.com/gcm/android&accepts-mfa-tokens=true. |
|
Thanks, instantly fixed the project withings-sync 🚀 ! |
Summary
Cloudflare detects the User-Agent switch between the sign-in page (browser UA via
SSO_PAGE_HEADERS) and the login POST (defaultGCM-iOSUA) and returns 429 Too Many Requests.Pass
SSO_PAGE_HEADERSon both the login POST and MFA verify call to keep the User-Agent consistent within the session.Test plan
Summary by CodeRabbit
Bug Fixes
Chores