I'm trying to provide additional authentication for user within an app. With email/password auth already implemented, I wanted to add Facebook/ Google authentication as well.
I've tried with firebaseui:
const ui = new firebaseui.auth.AuthUI(firebase.auth());
ui.start(selector, {
callbacks: {
signInSuccessWithAuthResult(authResult) {
that.handleAuthentication(authResult);
return false;
},
},
credentialHelper: firebaseui.auth.CredentialHelper.NONE,
signInFlow: 'redirect',
signInOptions: [
{
provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,
},
{
provider: firebase.auth.GoogleAuthProvider.PROVIDER_ID,
},
{
provider: firebase.auth.FacebookAuthProvider.PROVIDER_ID,
},
],
});
While the UI is rendered correctly in the passed selector, I cannot open Google/ Facebook authentication as it brings this message:
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 correct, since location.protocol is equal to file:.
My question is - how can I make it possible to use Facebook/ Google auth within an Electron app?