Reputation: 3238
It seems the Storage sample [https://github.com/firebase/quickstart-js] sample has 400 error.
Failed to load resource: the server responded with a status of 400 (OK)
It seems the api key is wrong, but I actually copy it from firebase console.
My alive demo is here: https://fir-storage-25695.firebaseapp.com/
Thanks,
Upvotes: 5
Views: 13378
Reputation: 9389
If you go a little deeper into your logs you will see that you are getting error auth/operation-not-allowed
and it says "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."
.
So, observing your code, on loading you are calling signInAnonymously()
and whats happening is that you haven't enabled the anonymous authentication on your firebase console. Make sure you go there and activate it.
Upvotes: 9