the-road-to-react-with-firebase / react-firebase-authentication

🔥 Boilerplate Project for Authentication with Firebase in React.
https://www.robinwieruch.de
1.01k stars 296 forks source link

Authorization(1): UsersList not loading #22

Open joshuaiz opened 5 years ago

joshuaiz commented 5 years ago

Hi Robin,

Thanks for this and all of your tutorials and articles.

I've completed the Authorization(1) section and I'm getting PERMISSION DENIED errors now when I try to sign a user up.

Here is the warning/error in the console:

[2019-01-30T03:08:20.837Z] @firebase/database: FIREBASE WARNING: set at /users/3TmKy1wayITeJ1QSkHiAVrHj4BC3 failed: permission_denied

Because of this, there are no users in the users array so cannot view them on the Admin page. Any idea why I'm getting denied and how to fix?

Thanks!

bmoyroud commented 5 years ago

@joshuaiz this is likely to do with the Firebase security rules. Go to Database then Rules (2nd after Data) and change your rules to the following

{ "rules": { ".read": true, ".write": true } }

It should work then!

joshuaiz commented 5 years ago

@bmoyroud that was it! Thanks!

rwieruch commented 5 years ago

Need to fix it asap! Thanks for reporting 👍 and sorry for you having to run into this!

EDIT: Should be mentioned in the book now. But I keep the issue open for people running into it.