Skip to content Skip to sidebar Skip to footer

Is Firebase Uid Unique Across Multiple Apps?

I have two different app which connects to same backend server and part of a same applications but different user. Say just like Uber Driver App and Uber User App. Will the UID of

Solution 1:

As I just responded to your comment here:

UIDs are definitely be unique within a single project (so also across all apps in that project). I think they're also unique across all projects, but I've never had a need to investigate that.

Given that Firebase uses the UIDs to identify users, it sounds reasonable to use them to identify objects in Mongo.

Solution 2:

UIDs are unique within a single project. Even accross different apps if they use the same project.

But according to the firebase blog, the uids will be different accross projects. If you use different projects on different apps, uids will be different.

The Firebase user IDs on each project will be different.

https://firebase.googleblog.com/2016/12/working-with-multiple-firebase-projects-in-an-android-app.html

Solution 3:

User's unique ID (uid) is only guaranteed to be unique across all providers in single app. If you want to mix uids from several apps you can add a prefix to uid, which will be unique to each app.

e.g. with uid: SamPLeUid12345 which might be repeated across several apps, you can store: app1 uid: app1-SamPLeUid12345 app2 uid: app2-SamPLeUid12345

Post a Comment for "Is Firebase Uid Unique Across Multiple Apps?"