<GoogleLogout /> does not log out
See original GitHub issueAdded login and logout buttons on page as below:
<GoogleLogin clientId="xxx" buttonText="Login" onSuccess={responseGoogle} onFailure={responseGoogle} />
<GoogleLogout buttonText="Logout" onLogoutSuccess={logout} />
Steps I followed: 1.Clicked Login button, logged in with my google credentials 2.Clicked Logout button 3.Clicked Login button again
Expected: On step 3 I should see login popup by google again as I did click logout button in step 2.
Actual: On step 3, I didn’t saw login popup and I am auto-logged in
Issue Analytics
- State:
- Created 6 years ago
- Comments:32 (3 by maintainers)
Top Results From Across the Web
Google Sign out not working properly using react
<GoogleLogin> is working fine . But when i tried to logout it just setting the state out. From the below code one can...
Read more >Sign out of Gmail - Android - Google Support
The only way to sign out of the Gmail app is to remove your entire account from your phone or tablet. However, you...
Read more >How to Sign Out of Your Google Account on All Devices at Once
1. Go to https://myaccount.google.com/device-activity in a web browser. You can use any web browser, like Google Chrome, on your phone, tablet, or computer...
Read more >Log out of Facebook | Facebook Help Center
Was this helpful? How could it be better? Keep in mind that this form is for feedback only and you won't receive a...
Read more >Signing Out Users and Disconnecting Accounts | Authentication
Sign out users; Disconnect accounts. Note: Google Sign-In for Android is based on an older, legacy library that lacks many new features now ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had this same problem and worked on it for days. I am using cookies to store the GoogleID, and everything worked as long as I did not refresh while logged in. The refresh kills the GoogleLogout object, so it won’t click anymore. The comments above really helped and made me try to create my own clickable logout image and just replace the GoogleLogout component with a clickable image like this:
<img onClick={forceMyOwnLogout} src={RedLogoutPicture} alt=“LO” width=“100” />
The code in forceMyOwnLogout is similar to above, except I added an if to make sure the window.gapi exists and this.forceUpdate() at the end. It works very well, and the only side effect, which I actually like is that you are forced to select the logger-inner instead of just logging in without asking who ! Here is the code:
When I get sometime I will look into it, it’s a good project but this Logout issue is killing it.