Reputation: 27
I am new to firebase and am creating messaging app and using private otp service for registering phone number.i am using both real-time database and firestore so I need to protect database in security rules.it seems like using auth.uid is the only way to use in security rules.
I am saving chat thread in real-time database and saving user profiles in firestore.
How can I create auth.uid for security rules for my users phonenumber thats authenticated using private otp service.
Please help me how can I approach this.
Upvotes: 1
Views: 899
Reputation: 599111
As Renaud commented, you'll want to:
At this point the information from the custom token is available in the security rules for Firestore and Realtime Database.
Upvotes: 0