I have login page with Facebook (I am working with Firebase Auth) and when I run my app on my device and click on the login button I get the error message:
This operation is not supported in the environment this application is running on. "location.protocol" must be http or https and web storage must be enabled.
and the error code is:
auth/operation-not-supported-in-this-environment
If I run this app in my Google Chrome, its working great. Where is the problem?
Thanks.
Login Code:
var provider = new firebase.auth.FacebookAuthProvider();
firebase.auth().signInWithPopup(provider).then(function(result) {
// This gives you a Facebook Access Token. You can use it to access the Facebook API.
var token = result.credential.accessToken;
// The signed-in user info.
var user = result.user;
console.log(user);
// ...
}).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
console.log(errorMessage);
console.log(errorCode);
var email = error.email;
// The firebase.auth.AuthCredential type that was used.
var credential = error.credential;
// ...
});