When i call the auth2.signIn() function i see the following result in my network tab:
GET https://accounts.google.com/o/oauth2/iframerpc?action=issueToken...
Status Code 200
{"error":"USER_LOGGED_OUT","detail":"No active session found."}
But the error Callback of my auth2.signIn(...) function is never called.
My Code should work because i get the popup_closed_by_user error callback.
Anyone knows how to solve the USER_LOGGED_OUT error?
And i guess the error callback should be called.
My code looks something like this...
...
gapi.load('auth2', () => {
console.log('load:auth2');
this.initAuth2();
this.initListeners();
});
...
private initAuth2() {
console.log('initAuth2');
this.auth2 = gapi.auth2.init({
client_id: '###',
scope: 'profile'
});
}
public signIn(): Promise<any> {
const options = new gapi.auth2.SigninOptionsBuilder();
options.setPrompt('select_account');
this.auth2.signIn(options).then((user) => {
console.log(user);
resolve(user);
}, (err) => {
console.log(err);
reject(err);
// });
})
...
Hey.
After hours of debugging i was found the problem.
I recentrly installed ghostery browser plugin (blocks tracking and ad scripts)
Login Worked in all Browsers except for chrome (where ghostery was installed)
So somehow ghostery caused this "USER_LOGGED_OUT" error.
But anyway the error callback was never called for the error i mentioned above.
so i guess that should be fixed :)
Good to know your problem has been resolved.
We already have another bug to track the callback issue: https://github.com/google/google-api-javascript-client/issues/385
Hey @kongguibin @dominikstrasser I'm having this issue with ghostery, is there a fix for it?
Most helpful comment
Hey.
After hours of debugging i was found the problem.
I recentrly installed ghostery browser plugin (blocks tracking and ad scripts)
Login Worked in all Browsers except for chrome (where ghostery was installed)
So somehow ghostery caused this "USER_LOGGED_OUT" error.
But anyway the error callback was never called for the error i mentioned above.
so i guess that should be fixed :)