This might be a really dumb question, but I need help.
I have a website that authenticates a user through OAuth with their Google accounts. The problem is that after I press logOut button (now the token is null), if I press again the logIn button the pop-up used for credentials, this one:
doesn't appear and the client is logged automatic.. .. I don't have any more ideas about this problem..
Thank you
gapi.auth.signOut();
if (!gapi.auth.getToken()) {
console.info('Now signed out, token null.');
}
this is my signout code, and the info appears into the console. I use angular-google-plus.js and my login looks like this:
GooglePlus.login().then(function(authResult) {
if (authResult['access_token'] && !authResult.error) {
var accessToken = gapi.auth.getToken().access_token;
gapi.client.load('plus', 'v1', apiClientLoaded);
} else {
$scope.welcomeMsgGoogle = "autentificare eronata";
}
});
function apiClientLoaded() {
gapi.client.plus.people.get({ 'userId': 'me' }).execute(handleEmailResponse);
}
function handleEmailResponse(user) {
var accessToken2 = gapi.auth.getToken().access_token;
gapi.auth.setToken(accessToken2);
/// some code
}
I try to use cookie_policy: 'single_host_origin'
and still doesn't work..