Authenticating Social login with Firebase Auth and Express?

Viewed 426

I'm quite new to Firebase and slightly new to Express and I'm having a difficult time trying to use the authentication process Firebase offers.

I have this route, but everytime I click the button that triggers the route, I get this error 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.

I'm pretty sure web storage is enabled, but I'm quite unsure how to fix the location.protocol. What am I doing wrong?

Here's the route:

app.get('/auth/facebook', function(req, res) {
  const provider = new firebase.auth.FacebookAuthProvider();
  firebase.auth().signInWithPopup(provider)
    .catch(err => console.log(err));
});

Here's the full Firebase app

1 Answers
Related