Strava logout from my website

588 views
Skip to first unread message

Tech The Big Now

unread,
Jul 12, 2016, 4:42:02 AM7/12/16
to Strava API
Hi, I have created a website with Strava Connect.
After the user islogged with Strava I need to create a logout flow.
Basically I need my PHP page log out my account Strava to have a new opportunity to access with a different account Strava on my site.

I have checked the API but I not found anything.

Any idea?

Thanks
Daniele

Mario Menti

unread,
Jul 12, 2016, 4:53:26 AM7/12/16
to strav...@googlegroups.com
You won't need the Strava API for this - usually this is as simple as clearing the user session information at your end, i.e. whatever you are using to store the currently logged-in session info in (e.g. session cookies or whatever).

Mario.

Tech The Big Now

unread,
Jul 12, 2016, 5:15:49 AM7/12/16
to Strava API
Thanks Mario but I have already removed all cookies and sessions from my website.
But when I click again on Strava Connect button the Strava site recognize that the user is already logged and skip the Strava Login Page

Mario Menti

unread,
Jul 12, 2016, 5:22:30 AM7/12/16
to strav...@googlegroups.com
Oh right - try adding "approval_prompt=force", this will always force
the approval prompt to be shown, even if the user has previously
authorised your app.

See https://strava.github.io/api/v3/oauth/

Tech The Big Now

unread,
Jul 12, 2016, 5:41:48 AM7/12/16
to Strava API
Thanks Mario but the strava site with this param show the authorization prompt and not the login prompt.
It is not my case because the user is always logged.

Other solution?

Mario Menti

unread,
Jul 12, 2016, 8:50:30 AM7/12/16
to strav...@googlegroups.com
I'm a little confused - are you saying you want to automatically sign a user out of Strava when they sign out of your app? If so, I don't think you can do that, and probably for good reason - users wouldn't exactly appreciate that...


Tech The Big Now

unread,
Jul 12, 2016, 9:15:07 AM7/12/16
to Strava API
When I login to my site via Strava Login I keep only the user id and the access token int my session.

But If I destroy my session on the custom logout on strava.com my user is logged yet.

But If I click again on Strava Login I should get the page with the login on strava.com to connect other user without use the strava.com's logout function.

But It seems that is not possible, correct?

Thanks
Daniele

Mario Menti

unread,
Jul 12, 2016, 9:23:43 AM7/12/16
to strav...@googlegroups.com
Correct, I don't think that's possible, or even desired - I don't think
Strava would want 3rd party apps to be able to sign their users out of
Strava. But I think there is a suggestion to Strava in here somewhere:
the authentication page that lets you sign in to Strava doesn't provide
any way to sign out and sign in again as a different user - it's quite
common for these pages to contain a link to let users do that, making
the process of switching users when signing in to 3rd apps much
quicker/more streamlined (e.g. see Twitter's oauth page, and similar).

Tech The Big Now

unread,
Jul 12, 2016, 9:48:08 AM7/12/16
to Strava API
Thanks Mario Menti!


Message has been deleted

Lee Sai Mun

unread,
Feb 1, 2017, 2:42:37 AM2/1/17
to Strava API
Redirect the user to https://www.strava.com/logout seem to solve this issue you are facing.

On Tuesday, July 12, 2016 at 9:48:08 PM UTC+8, Tech The Big Now wrote:
Thanks Mario Menti!


Reply all
Reply to author
Forward
0 new messages