Allow multiple accounts when signing in to Google+

For my application, I followed an example of this page for logging in using Google+, but it subscribes the user and calls signinCallback whenever the page loads. But I don’t want him to automatically subscribe to the page loading and, more importantly, I need to give the user the opportunity to choose between his various Google accounts.

When I register a user using gapi.auth.signOut() and then reload the page containing this button, it still signs me automatically. This prevents the user from logging in with a different google account.

Gmail's workflow, apparently, is to automatically enter me into the system, but it gives me the opportunity after entering the "Add Account", which goes to this page.

But when I try to change the continuation url to my service, it gives me the error "invalid page request" .

+6
source share
1 answer

It's a little late, but I was just looking for this answer and realized something.

There are two options that I know of, one of them is to use exit . The next time the user logs in, they will be prompted to make a user selection.

The second is to install data-approvedprompt to force. This will lead to user selection and can be used to switch the user.

+1
source

Source: https://habr.com/ru/post/974094/


All Articles