My application relies on Google Sign-In. Suddenly, today, the GoogleAuth.then()
method has stopped calling its callbacks. This code does nothing (printing neither result):
gapi.auth2.init({
client_id: 'MYID.apps.googleusercontent.com',
scope: 'profile email'
}).then(function() {
console.log("success called");
}, function() {
console.log("failure called")
});
This code does nothing even though using other methods to interrogate signin (such as creating listeners on isSignedIn and currentUser) work correctly.
Our code hasn't changed, but this breakage appears to be slowly rolling across our customer base in what feels vaguely like Google doing some sort of rolling deployment. At the moment this problem is a couple hours old. It has stopped working on my laptop but still works on my phone. A number of our customers around the world are experiencing different results.
Is this a Google bug? How do I report it to someone?
I was today having similar problem as I had needed a quick hack for
<div class="g-signin2" data-onsuccess="onSignIn">
not working, I call it now it this way.:
<script src="https://apis.google.com/js/platform.js?onload=sss"
async defer></script>
function sss() {
auth2 = gapi.auth2.getAuthInstance();
auth2.isSignedIn.listen(
function(isSigned){
if (isSigned) onSignIn(window._auth2.currentUser.get());
else signOut();
})
}
It works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With