Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Sharing with Multiple Web Apps

Tags:

firebase

We have an app that needs to be split into two separate websites(webapps). My solution was to just use 2 different firebases, but we're trying to share user data across both sites(user profile data, user content, etc).

Is it possible to use one firebase to support multiple sites? Is this considered an accepted practice? Both apps are written in AngularJs.

like image 588
Ron Smalls Avatar asked Sep 30 '22 18:09

Ron Smalls


1 Answers

If you have multiple apps, all of which share some common data, like their users, it is indeed reasonable to use a single Firebase to power all of them.

Your data structure might look something like this:

- Firebase root
  - users
  - app1
    - ... stuff ...
  - app2
    - ... stuff ...

This will have the benefit of making it easier to share any other overlapping data in the future.

On the downside, they share the same quota / concurrents ceiling, so managing billing might get tricky. If the identity of your users is indeed all that you're sharing between them, using the same login providers with Simple Login might satisfy that need anyway. It would allow the same user to log in with twitter in both services and share a common uid across them.

like image 81
mimming Avatar answered Oct 24 '22 12:10

mimming