-
Notifications
You must be signed in to change notification settings - Fork 14
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
the rules file in firestore not working #32
Comments
Please follow the instruction from firestore here. As the issue is not a bug of the library, it'll be closed. |
no i mean if i used : if request.auth != null this then why its not working then the data base not at all writeable |
but how to use can u give a simple example |
When you have the below rule for firestore
user = auth.sign_in_with_email_and_password(email, password)
data = {
"name": "Iron Man"
}
db.collection('Marvels').document('Movies').set(data, token=user['idToken']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What would you like to share?
so basically i was trying to store data but a error poped up like
Error during signup: [Errno 403 Client Error: Forbidden for url:
https://firestore.googleapis.com/v1/projects/fgsmmpanel/databases/(default)/doc
uments:commit?key=apikey {
"error": {
"code": 403,
"message": "Missing or insufficient permissions.",
"status": "PERMISSION_DENIED"
}
}
and this is the rule file config
Error during signup: [Errno 403 Client Error: Forbidden for url:
https://firestore.googleapis.com/v1/projects/fgsmmpanel/databases/(default)/doc
uments:commit?key=AIzaSyBUizgx29lr-l07YEjylOgQRDe5WSdnmyA] {
"error": {
"code": 403,
"message": "Missing or insufficient permissions.",
"status": "PERMISSION_DENIED"
}
}
and this is the code
user_doc = fsdb.collection('users-wallet').document(user_info_['users'][0]['email']).get()
wallet_balance = user_doc.get('wallet', 0)
Additional information
what am doing wrong or is it wrong with rules file cuz if i give
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
allow read, write;
}
}
it works fine
im so stressed
The text was updated successfully, but these errors were encountered: