I want to sign out from my website after login using google plus this is my script for signout
function signOut() {
var auth2 = gapi.auth2.getAuthInstance();
auth2.signOut().then(function () {
console.log('User signed out.');
});
}
this is signout button
<li id="google_plus" style=""><a href="#" onclick="signOut()">Logouts</a></li>
but when i try to sign out this error will show
Uncaught ReferenceError: signOut is not defined at HTMLAnchorElement.onclick (VM684 home:269)