I'm currently facing an issue with Fitbit login on iOS devices. When attempting to log in using a Google account on the Fitbit OAuth page, the page keeps redirecting back to the Fitbit OAuth page after selecting google account, creating a loop. This behavior occurs only on iOS — everything works as expected on Android.
Setup Details:
Framework: Flutter
API Used: Fitbit Web API
Authorization URL Used: https://www.fitbit.com/oauth2/authorize?response_type=code&client_id=23Q3Y9&redirect_uri=mndprs-hesoyam38-fitbit://fitbit/auth&scope=activity%20cardio_fitness%20heartrate%20location%20nutrition%20profile%20settings%20sleep%20social%20oxygen_saturation%20respiratory_rate%20temperature&expires_in=10080
What I've Tried: The login flow works perfectly on Android. The issue only occurs on iOS when logging in with a Google account on the Fitbit OAuth page. No errors are thrown; it simply keeps redirecting back to the login page.
Video link of what's happening
https://drive.google.com/file/d/1yaQCkfgW11Q5yBz4zJSr2Z1Q83gsAbnv/view?usp=sharing
Question: What could be causing this redirect loop on iOS? Is there a platform-specific configuration or redirect URI handling issue that I might be missing?
Any help would be greatly appreciated!
based your explanation this seem like platform-specific configuration. most likely related to iOS.
if the problem in redirect URL=mndprs-hesoyam38-fitbit://fitbit/auth, the login flow would not work on android also. since it works on android. the redirect URL it probably valid, and the issue is limited to iOS deep link handling.
after a successful login, Fitbit tries to redirect to back to your app using your custom schema. on iOS the custom URL not properly registered on IOS. which may cause a redirect loop.
their problem i guess custom URL schema is missing or misconfigured in the Info.plist file. make sure your custom URL schema is properly registered in Info.plist under CFBundleURLTypes . after configured properly uninstall and reinstall the app on your iOS device. iOS needs to a fresh install to apply URL schema changes. if possible, test on a physical iOS device.
i hope my suggestion helps to resolve your issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With