Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not obvious what databaseURL in config should be #143

Open
robations opened this issue Jan 26, 2021 · 5 comments
Open

Not obvious what databaseURL in config should be #143

robations opened this issue Jan 26, 2021 · 5 comments

Comments

@robations
Copy link

Hi, I'm new to Firebase and just created a web app in Firebase, but React Firebase is asking for databaseURL, which is not given in their copy-config panel. The keys I do have are:

  • apiKey
  • authDomain
  • projectId
  • storageBucket
  • messagingSenderId
  • appId

I tried adding a Cloud Firestore, but if this has a databaseURL it's not obvious where I would find it. I'm strongly suspecting this is something they have removed from their API, but React Firebase still thinks it's needed?

Another possibility is I need to create a Realtime Database, but from research so far, I'm not sure this is actually what I want to use.

@rohan-deshpande
Copy link

That value is present in your app config in Firebase. Go to the general section of your project settings and view the config, the databaseURL is there.

@robations
Copy link
Author

Hi @rohan-deshpande Thanks for the reply. I presume Firebase have changed something because it's not shown in the settings for me. I found some advice on how to construct the URL from the database name and added it manually.

This is what I am given:

const firebaseConfig = {
  apiKey: "xxx",
  authDomain: "xxx.firebaseapp.com",
  projectId: "xxx",
  storageBucket: "xxx.appspot.com",
  messagingSenderId: "xxx",
  appId: "xxx"
};

@kua-as-exe
Copy link
Collaborator

Hi @robations. Did you setup the realtime database?

@robations
Copy link
Author

@JorgeArreolaS I'm not using realtime. I suspect they now only add this to your config if you've explicitly enabled it.

I guess this might mean the databaseURL key should/could be an optional key? As a Firebase newby I didn't realise databaseURL referred to the Realtime DB, as opposed to the Firebase Store.

@davidhughhenrymack
Copy link

davidhughhenrymack commented May 3, 2021

I set it to empty string, using Firestore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants