How to fix “This operation is not supported in the environment this application is running on. ”location.protocol“ …” error?
问题 I try to use Firebase (Google) authentication but I'm getting 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. My code is: var provider = new firebase.auth.GoogleAuthProvider(); function Singin(){ firebase.auth().signInWithPopup(provider).then(function(result) { var user = result.user; console.log(user); }).catch(function(error) { console.log(error);