Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OAuth Authentication with Fitbit API on Android - Stuck at Permission Page

Hello Fitbit Developer Community,

I'm currently working on integrating the Fitbit API with my Android application, utilizing OAuth2.0 authentication to access various user data scopes.

The process initiates successfully with my application navigating to the Fitbit login page. However, post-login, instead of being redirected to the permission page to grant or deny access to the requested scopes, the flow seems to stall.

Here's a high-level view of my implementation:

  1. I'm initiating the OAuth2.0 flow with the necessary parameters: CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, and the requested scopes.

  2. Using the appauth library to manage the OAuth2.0 flow.

  3. On button click, the authenticate() function gets triggered.

  4. This function correctly opens the Fitbit login page.

  5. After the user logs in, I expect it to redirect to the permissions page, but it gets stuck and does not proceed further.

For the detailed code, I've created a GitHub Gist which you can view here. I've shared my main activity, AndroidManifest, and build.gradle file.

I've double-checked my app settings on the Fitbit developer portal and confirmed that the set CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, and requested scopes are all correct. I would greatly appreciate any insights or assistance with this issue.

Thank you in advance for your time and help.

Best Answer
0 Votes
5 REPLIES 5

(Moved to Web API forum for best results.)

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Hi @asu101a 

I'll take a look at the code provided and let you know what I find out.

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

Hi @asu101a 

You posted another question in the forums, https://community.fitbit.com/t5/Web-API-Development/Accessing-Special-Health-Data-EDA/td-p/5423320, so I wanted to check in to see if you were able to resolve the redirect/stall problem you reported here.   Are you still having this problem?

Thanks!

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

Hi @asu101a 

I have submitted a bug to engineering for this problem.  We've heard one workaround is to refresh the page that is stuck.   If that doesn't work, please let me know.   I'll provide an update on this problem once I have it.

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

I found out the problem is related to a bug in Chrome.   The bug has been fixed and was pushed out on Monday, Oct 2nd.  When you get notified to update Chrome on your Android device, please do so to resolve the problem.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes