I'm looking for the difference between Firebase authentication with custom claims and a private Firestore document for each user with no write permissions.
The use case I am facing is a SaaS solution with 3 stripe plans. Each stripe plans has different properties. A user should be restricted to the plan they are subscribe to.
The only difference I see is that custom claims only require on call to Firebase while a document in Firestore would require 2 (auth + get user private data).
Are there any other differences I'm missing?
It sounds like you're trying to compare two security models:
Some changes that come to mind:
But probably the most important one for making up you mind:
For more good tips around this, have a look at the video Five tips to secure your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With