I m just exploring Firebase. I ve set up Firebse Auth using Google sign-in. It just works perfectly in my local while running from my local server. I tried to push it to my github pages, the authentication part failed to work. I ve used signinWithRedirect(), provided the code below. The result of the request is always an object with user:null and it redirects to about:blank. Could someone help me out, thanks in advance.
var provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithRedirect(provider);
firebase.auth().getRedirectResult().then(function(result) {
var token = result.credential.accessToken;
currentUser = result.user;
console.log(token);
});
I have the same issue here. That's happening because you didn't authorized your domain to run this operation. In the Firebase console, open the Auth section. On the Sign in method tab, add your domain to the OAuth redirect domains list.
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