Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Firebase Realtime DB and Firestore in the same app #553

Closed
d3mac123 opened this issue Nov 28, 2017 · 7 comments
Closed

Firebase Realtime DB and Firestore in the same app #553

d3mac123 opened this issue Nov 28, 2017 · 7 comments

Comments

@d3mac123
Copy link

Hi,

Any chance, in a near future, to be able to use both Realtime DB and Firestore in the same app? According to Google, this is possible: https://firebase.google.com/docs/firestore/firestore-for-rtdb

The reason I am asking is that my current app could benefit from both scenarios (currently it is only working with Realtime DB).

Thanks!

@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Nov 28, 2017

I thought I read somewhere that was not possible but you're right they say it is.

Google doesn't really say how to make them cooperate so I guess it "just works". If that's the case then the installer should be a bit different. Now I'm asking: "Are you using Cloud Firestore instead of the Realtime Database engine (y/n)" and enable Firebase when 'y', but disable when 'n'.

So it needs to be split into 2 questions really:

"Are you using Cloud Firestore (y/n)"
"Are you using Realtime DB (y/n)"

Do those questions make sense you think?

For backward compatibility I'll assume 'y' in case no saved setting for 'realtime db' was found.

@EddyVerbruggen
Copy link
Owner

I got it working nicely already - will push 5.0.1 later tonight.

@d3mac123
Copy link
Author

@EddyVerbruggen you are my idol! :)

@jagabs
Copy link

jagabs commented Apr 4, 2018

just curious, can you access rtdb from firestore rules and vice versa. Ex. if your user account is in rtdb then and lets say you wanted to add rules in firestore using the user details. Is it possible?

@EddyVerbruggen
Copy link
Owner

@jagabs I don't think so, but you better ask this on SO anyway.

@CarbonEdge
Copy link

It's not impossible I'm doing it right now, by mistake and trying to figure out how to stop.....

@jagabs
Copy link

jagabs commented Sep 15, 2018

@CarbonEdge how can u access the rules can you give a sample?

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

No branches or pull requests

4 participants