-
-
Save msaxena25/e19988d400df002445a0760846fd056b to your computer and use it in GitHub Desktop.
Angular 5 - Gmail Logout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(<any>window).gapi.load('auth2', () => { | |
(<any>window).gapi.auth2.init().then(() => { | |
var auth2 = (<any>window).gapi.auth2.getAuthInstance(); | |
auth2.signOut().then((res) => { | |
if (response.responseCode == 'S0001') { | |
window.location.href = '/login'; | |
} | |
}) | |
.catch((err) => { console.log('error is ', err) }); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment