uncaught exception: 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.网站谷歌认证与火力
var config = {
apiKey: "*****",
authDomain: "******",
};
firebase.initializeApp(config);
var provider = new firebase.auth.GoogleAuthProvider();
provider.addScope('profile');
provider.addScope('https://www.googleapis.com/auth/drive');
firebase.auth().signInWithRedirect(provider);
alert(1);
}
看起来像HTTP问题,推动SDK需要你authdomain是HTTPS :// –
这里你的实际问题是什么?代码仅在本地主机上运行的 – jeffbyrnes
。是否有可能在没有任何网页浏览器的情况下运行该代码 – ArunKarthick