udarts
udarts

Reputation: 888

Can users add their own firestore db in a react native app

I am wondering if it is possible to setup firestore database when the app is already running. For example, letting users add their own database to store values of the app into their own environment.

I already know how to set it up when developing, but that is my own database. I wonder if it can be done dynamically, as you also have to download and add the google service file to the app.

Cheers,

Upvotes: 0

Views: 21

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 599716

If you want each user to write to their own database, you'll need to have them select a Firebase/Google Cloud project from within your app. This means you need to have them sign in to their Google account that they use in GCP, and then select a project. There is an API for this, but all of this is quite involved.

If you instead want to separate the data for each user, the more common approach is to store the data for each user in a separate document, and then in collections under that.

Upvotes: 1

Related Questions