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);
});
Aucun commentaire:
Enregistrer un commentaire