Building Dart APIs with Google Cloud Run | Kodeco

Learn how to build backend applications using Dart and Google Cloud Run.


This is a companion discussion topic for the original entry at https://www.kodeco.com/31602619-building-dart-apis-with-google-cloud-run

When you register and sign in users via the flutter firestore API you create entries in the Auth tab of the firebase console, and those users are used in the firestore rules.

Using the API that you show us in Cloud Run, the users are not special, and so cannot be used in the rules in the same way, right ?

You’re absolutely right @biancashouse. The users you create in this tutorial are not Firebase Auth users, so you can’t directly apply Firestore rules on them using request.auth. But you can still access them like you’d do with normal Firestore data (using something like resource.data) and apply same rules on them.

If you’d noticed, the authentication in this tutorial teaches how to build your own authentication and treats Firestore like a normal database that you can use to build an authentication system without Firebase Rules.