标签: firebase
存储样本[https://github.com/firebase/quickstart-js]样本似乎有400错误。
无法加载资源:服务器响应状态为400(确定)
似乎api密钥错误,但我实际上是从firebase控制台复制它。
我的活着演示在这里:https://fir-storage-25695.firebaseapp.com/
谢谢,
答案 0 :(得分:8)
如果您更深入地了解日志,就会发现您收到错误auth/operation-not-allowed,并显示"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section."。
auth/operation-not-allowed
"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section."
因此,观察您的代码,在加载时您正在调用signInAnonymously() 并且发生的事情是您尚未在firebase控制台上启用匿名身份验证。确保你去那里并激活它。
signInAnonymously()