DmitrySharabin / mavo-firebase-firestore

Firebase backend plugin for Mavo. Store and sync app data in milliseconds. Store and serve files at Google scale. Authenticate users simply and securely. All the Google Firebase powers are at your fingertips.
https://plugins.mavo.io/plugin/firebase-firestore
MIT License
6 stars 0 forks source link

firebase vs. mavo authentication #14

Closed DmitrySharabin closed 4 years ago

DmitrySharabin commented 4 years ago

From @karger

I'm facing a problem involving multiple firebase mavos on a page.
You're creating a different firebase app for each one. But since in firebase authentication is currently by app, that means the user has to log into each app separately. Tiresome, and means I have to clutter the screen with multiple mv-bars.

In fact, such per-app login isn't technically necessary, because authentication to a firebase app is organized around the project id and has no dependence of the (mavo) collectionName or fileName. So in theory, a single firebase app could service multiple mavo apps using only a single firebase login interaction. The firebase app associated with various mavo apps could be the same one; just have this.app point to the same app multiple times. When you configure a new mavo, just check if an app with it's projectId has already been initialized. Logging in to any one of the mavo apps would log you in to all of them (which permits hiding the mv-bar for all but one).

This does rule out the case where someone would want to log in as a different user on each app, but I can't think of a use case for that.

DmitrySharabin commented 4 years ago

But since in firebase authentication is currently by app, that means the user has to log into each app separately.

Actually, that already was fixed in #7. Do you still face this issue?

DmitrySharabin commented 4 years ago

I believe this should be fixed now in the dev version. Will you please check if I am wrong. If I am not, we can close this issue.

DmitrySharabin commented 4 years ago

Well, I believe it's fixed now. If not, we can re-open it at any time.