Google documents there gapi.auth.signOut()
method here: https://developers.google.com/+/web/signin/#sign-out
The catch is that it says you can only call that method after the signinCallback
has fired. So far as I can tell, the only way to fire the signinCallback
is to put a sign-in button on the page.
This works great on my sign-in page itself, but as soon as I've authenticated a user, there's no need to put the G+ sign-in button on subsequent pages. I just want to have a small 'log out' link in the corner that the user can click to sign-out.
I tried having my log-out link call gapi.auth.signOut()
but it does nothing unless I am also showing a useless log-in button. How do I get this to work?