1

I'm tried to make firebase in nodejs as firebase documentation the email&password auth it's working good , but when I use a provider auth like google it's show me this message

auth/operation-not-supported-in-this-environment This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.

this is my code

router.get('/signin/google', (req,res,next)=>{
var provider = new firebase.auth.GoogleAuthProvider();

firebase.auth().signInWithPopup(provider).then((result) =>{
    var token = result.credential.accessToken;
    var user = result.user;
    console.log(token,user)

  }).catch(function(error) {
    console.log(error)
  });

})

please bring your attention I have the server like http://localhost:3000 and call the api http://localhost:3000/signin/google from browser and from angular server in both of case give me the same message

Mahmoud Niypoo
  • 1,598
  • 5
  • 24
  • 41

0 Answers0