Is there anyway to force an account selection screen on login?
See original GitHub issueReally enjoying the library so far! I am following this medium tutorial (Link) that really doesn’t deviate much from the basic configuration of setting up a login and logout button
<GoogleLogin
clientId={clientId}
buttonText="Login"
onSuccess={onSuccess}
onFailure={onFailure}
cookiePolicy={'single_host_origin'}
style={{ marginTop: '100px' }}
isSignedIn={true}
/>
<GoogleLogout
clientId={clientId}
buttonText="Logout"
onLogoutSuccess={onSuccess}
/>
I can successfully login and logout however after the first login/logout I am no longer prompted to re-enter my password /email and I it just automatically signs into the account I previously logged in as.
I am on version “react-google-login”: “^5.2.2”, and the codebase in the tutorial is using “react-google-login”: “^5.1.20”.
I tested in all relevant browsers and the same thing is occuring;
in the deployed example of the tutorial Link even when I login for the first time and logout each subsequent login prompts me to choose which account I want (the behavior I desire) I can see the popup for sign in for the tutorial is pointed at the URL
https://accounts.google.com/_o/oauth2/auth/oauthchooseaccount_?redirect_uri = .....
Whereas using my version of this library will point to the URL
https://accounts.google.com/o/oauth2/auth?redirect_uri= ....
Is there anyway to get the account selection URL back, maybe as a prop?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top GitHub Comments
Hello @ethanny2 @dvnecroillusion ! I found a way to force it, juste add
prompt="select_account"
in the props of the GoogleLogin component, just like this:It works, thanks a lot!