I’m building a flashcard study app with specific data for each user.I would like anyone with experience to share the best way of connecting user to their data. I’m using firebase auth as the auth backend and Firestore database to store the data. Here’s what I came up with to connect user to their data:
Data structure: a collection named
USERS containing documents with the user’s data stores all of user’s data. The id for each document is the same ID as the users ID created by firebase auth.
Connecting the data: through Get current user (Firebase Auth) flow function retrieve current user ID. Use the ID to build the HTTP request URL to retrieve the info from the specific user.
In your experience is that the best way? I also have to figure out how to set security rules properly. Any thoughts on that would be appreciated as well.