-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
I am able to use "Login with Google" successfully and now trying to implement Logout from Google using below standard Google javascript SDK for logout. It executes without any error and displays "User signed out" but does not logout user from gmail (or any google signed in in another tab ). How to logout a user from Google itself?
<script src="https://apis.google.com/js/platform.js?onload=init" async defer></script><script> function init() {
gapi.load('auth2', function() {
// Ready.
gapi.auth2.init(
{
client_id: 'deleted'
});
});
}
function googleLogout() {
alert("googleLogout start");
//gapi.auth2.getAuthInstance().signOut();
//OR (both are same)
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
});
alert("googleLogout done.");
}
gsaltintaskezzyhko, mrakowski0 and mounivura
Metadata
Metadata
Assignees
Labels
No labels