How to change Google account after signed in

538 Views Asked by At

I use javascript API because i want fully customized button, themes from Google not enough for my needs. I wrote small example sandbox. Problem is after sucessfull signed in, i cant choose another account. I try change configuration, but without result.

1

There are 1 best solutions below

0
On

I read more about this, and found answer there Google identity docs: How it works:

  • One Tap and Automatic sign-in are triggered only when users have signed in to Google before loading your web pages.
  • With the Sign In With Google button flow, users are prompted to sign-in to Google when the button is pressed, establishing an active Google session

My conclusion: in order for the user to choose another account that does not have a current session in the browser, you need to use Google button instead of On tap. You can create a button using google.accounts.id.renderButton. Setting up Google button can only be done within the framework of the API described in section GsiButtonConfiguration, because render creates a button inside an iframe and there is no access to it.

i changed my sandbox for demonstrate this