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

Multiple user authentication within single app?

I have 2 devices registered under 2 different user accounts. I am building a dashboard to pull data from both these devices and show it on the same dashboard.

 

Currently, I tried for a single device and it works fine. I used Authorization Code Grant flow to authenticate User A and receive a token and then subsequently make requests using this token.

 

Now, what would be the best way to authenticate User B for the same app? (As per my understanding, this app is now logged in as User A and all requests would be made for data of User A).

 

Is there a way to make requests with individual user credentials?

 

Please suggest the best approach.

 

 

Best Answer
0 Votes
1 REPLY 1

@Prab You need to be able to store the second access token. Since access tokens are unique per user, when you use that access token to make requests, it'll make requests for the correct user.

 

If you're trying to make Intraday requests, it will only work for the user that owns the app.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes