I'm working with Firebase in my project but getting this error auth/operation-not-supported-in-this-environment when login with google credentials.
.hbs file code
<span class="google-bg session-icon">
<a href="#!" id="google" onclick=" return loginWithGoogle(this)">
<i class="ti-google"></i>
</a>
</span>
script code
function loginWithGoogle(event){
$.ajax({
url: "/session/google/login",
type: "POST"
})
.done(function (data) {
error= JSON.stringify(data);
console.log(error);
M.toast({html: error})
});
}
Express code
router.post('/session/google/login',function (req, res, next){
//console.log('get resqust');
firebase.auth().signInWithRedirect(googleAuthProvider).then(function(result){
console.log(result);
}, function(error){
console.log(error.code);
res.json({
data: error.code
})
});
})
When I click on Google icon then call loginWithGoogle function and get the router path /session/google/login after that execute express code and generate error. I`m wondering to resolve this issue and what could be wrong ?
Thankyou!!!
from Get this error auth/operation-not-supported-in-this-environment using express nodejs
No comments:
Post a Comment