The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.
11-25-2023 08:21 AM
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
Solved! Go to Solution.
12-04-2023 04:53 PM
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");
12-04-2023 04:48 PM
@Dilhan973 Did you figure it out? Running into the same issue on localhost.
12-04-2023 04:53 PM
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");
01-21-2024 02:00 PM
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''
12-04-2023 10:11 PM
Thank you very much, that was exactly it.
11-26-2023 12:29 PM
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
11-26-2023 03:25 AM - edited 11-26-2023 03:25 AM
<Deleted>
11-25-2023 03:03 PM
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.
12-03-2023 07:42 PM
Every time a user logs in using strava to my site. It must each time authorize as above instead of being directly connected.
12-03-2023 08:07 PM
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
Welcome to the Community - here is your guide to help you get started!