Bud*_*Örs 6 javascript firebase firebase-authentication
我尝试使用 Firebase (Google) 身份验证,但收到此错误:
\n\n\n\n\n此应用程序运行的环境不支持此操作。“location.protocol”必须是 http、https 或 chrome-extension,并且必须启用 Web 存储。
\n
我的代码是:
\n\nvar provider = new firebase.auth.GoogleAuthProvider(); \n\nfunction Singin(){\n firebase.auth().signInWithPopup(provider).then(function(result) {\n var user = result.user;\n console.log(user);\n }).catch(function(error) {\n console.log(error);\n console.log(error.message)\n });\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n完整的错误是:
\n\nzi {code: "auth/operation-not-supported-in-this-environment", message: "This operation is not supported in the environment\xe2\x80\xa6chrome-extension and web storage must be enabled."}\ncode: "auth/operation-not-supported-in-this-environment"\nmessage: "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."\n__proto__: Error\n
Run Code Online (Sandbox Code Playgroud)\n
归档时间: |
|
查看次数: |
7531 次 |
最近记录: |