4

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!

asked Apr 27, 2025 at 16:09

1 Answer 1

2
+25

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.

answered May 1, 2025 at 14:05
Sign up to request clarification or add additional context in comments.

2 Comments

Even after adding the scheme, the problem didn't solve. What i also tried is changed my scheme from mndprs-hesoyam38-fitbit://fitbit/auth to mndprs://fitbit/auth and it is somehow working. Don't know why this behaviour, but i am not getting the loop issue since that change. Hopefully this resolves!
I am integrating Fitbit outh in flutter. I am slo facing similar problem in IOS. After 4-5 google sign in attempts only I am able to sign in. My redirect URI is com.mycompany.myapp://callback how to use it in info.plist

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.