Auth0 Home Blog Docs

Social Log in Google users can't change account


When a user logs in/signs up with google and then sign out, when trying to log in again with google, the user doesn’t get asked what account to log in to, if they were logged to only one google account, but instead, logged in to the site automatically with the account they have just logged out from.


Auth0 sign up/sign in with google
Google account selection
Log in authorised
Log out from app
Log out completed
Auth0 Sign in with Google
Log in authorised (without asking which account to use for Google log in)

Anyone can help? Thanks


:wave: @mariano

It could be an issue with clearing the social IDP session. Could you provide the code you are using to logout? Are you calling the logout endpoint?

Some additional questions that may help, is it just with Google accounts? Are you using Lock?


we were just clearing up the localStorage cookies as per the docs provided in the tutorial.

wasn’t aware there’s a logout endpoint to be called.

let me do that and get back

1 Like

Okay, there is a problem with returnTo

Both our app’s staging and dev URLs are onto a separate application in the auth0 account
I’ve setup both as allowed returnTo URLs, but it seems that only dev works. Staging is redirecting to prod after logout.

{domain}/v2/logout?returnTo={dev} -> correctly redirects to dev
{domain}/v2/logout?returnTo={staging} -> incorrectly redirects to prod
{domain}/v2/logout?returnTo={prod} -> correctly redirects to prod


@ksilviu.marian were you able to solve your issue with the social login?

closed #7

This topic was automatically closed after 5 days. New replies are no longer allowed.