I have this code:
return auth.signIn().then(function() {
return handleConnect(auth.currentUser.get());
});
I am seeing the handleConnect function called twice, once immediately and a second time after I login to Google using the popup window.
I added this code:
if (auth.isSignedIn.get() === true) {
return handleConnect(auth.currentUser.get());
}
else {
return auth.signIn().then(function() {
return handleConnect(auth.currentUser.get());
});
}
But auth.isSignedIn.get() equals false and the auth.signIn() is still happening.
Any idea why?