cancel
Showing results for 
Search instead for 
Did you mean: 

strava oauth approval_prompt

Dilhan973
Shkhara

Hello, I have a problem with strava authentication. When the user logs in for the first time everything goes well. However, during subsequent connections it still requires authorization to connect to the Strava account instead of directly connecting it to my application. The approval_prompt parameter is of course "auto". I don't see where the problem could be. Thanks in advance

1 ACCEPTED SOLUTION

Never mind, figured it out, You need to request the "read" scope as well. 
In my case:
Before: query.Add("scope", "activity:read");
After: query.Add("scope", "read,activity:read");

View solution in original post

11 REPLIES 11

maheshw
Mt. Kenya

@Dilhan973 Did you figure it out? Running into the same issue on localhost.

Never mind, figured it out, You need to request the "read" scope as well. 
In my case:
Before: query.Add("scope", "activity:read");
After: query.Add("scope", "read,activity:read");

Excellent. I was having the same issue. Looks like this was my problem as well. For those using Node.js Passport StravaStrategy use:

scope: 'read,activity:read_all''

Thank you very much, that was exactly it.

lopey66
Elbrus

authorization lasts 6 hours or so, meaning the token issued lasts 6 hours (7a), that last token (refresh token) issued is used again to re-authorize and issue a new refresh token  https://developers.strava.com/docs/getting-started/#oauth  

lopey66_0-1701030270357.png

 

 

Jan_Mantau
Denali

<Deleted>

Jan_Mantau
Denali

From the very sparse info you provided it would seem that you let known users every time connect to Strava instead of skipping this step on subsequent logins by using saved access tokens.

Capture d’écran 2023-12-04 à 00.38.23.png

Every time a user logs in using strava to my site. It must each time authorize as above instead of being directly connected.

I see your using localhost, is your website redirecting localhost ? when it should be your website if so go to https://www.strava.com/settings/api and then edit and add your website, as when other users will be redirected after they accept using your API, I don't think localhost is allowed(does not work ?). also you may need to revoke access your in apps https://www.strava.com/settings/apps . what should happen is the refresh token authenticates in the background. your authentication should only happen once and then it will appear in the apps of every user who is using your app/api