Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing information on how to seed the Firestore Database? #2

Open
oscklm opened this issue Jul 10, 2023 · 8 comments
Open

Missing information on how to seed the Firestore Database? #2

oscklm opened this issue Jul 10, 2023 · 8 comments

Comments

@oscklm
Copy link

oscklm commented Jul 10, 2023

Hey,

Is it on purpose, that there is no info in the course - nor any to be found on the repo, about setting up the database?

I'm thinking in terms of it already having data in the video. I think this could confuse quite a few people.

@nichemediapubs
Copy link

Agree. Did you make any progress with it @oscarklm ? I am stuck on it currently

@morgalorgadingdong
Copy link

I think you guys encountered the same hiccup I did. You do not have to manually add any data to your data base, but you do have to adjust the rules with the FireBase UI to allow read/write permissions. The most simple, and straightforward change to make to your rules would be to set "allow read, write: if false" to true.

rules_version = '2';

service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}

@jb-oe
Copy link

jb-oe commented Jul 14, 2023

I'm also having issues with this. I have tried adding the rule above but it hasn't made any difference.

Sorted it, I deleted the user and started again and it worked.

@vhazbun
Copy link

vhazbun commented Jul 15, 2023

Same here, I don't see the users collection and usernames collection.

@jb-oe
Copy link

jb-oe commented Jul 17, 2023

Same here, I don't see the users collection and usernames collection.

@morgalorgadingdong code sorted it for me but I had to delete the users from authentication and create them again. Which when I think about it, its obvious but Firebase is all new to me so the code from @morgalorgadingdong was essential.

@ghost
Copy link

ghost commented Jul 23, 2023

To add. this fixed my problem. It is done by navigating to "firestore database" in the left drawer, then selecting the rules tab and changing 'false' to 'true'

@krzysztofpodmokly
Copy link

This worked for me

rules_version = '2';

service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if request.auth != null;
    }
  }
}

@ejam4040
Copy link

ejam4040 commented May 6, 2024

Firebase auto selected my database the new datastore type. I had to switch to naitve before I could get any of the above to work. Then updating the rules as mentioned finally fixed the issues and the username check/creation is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants