'Please teach me uid of Firebase Authentication
I'm thinking of using the same Firebase project for two apps.
We are planning to use Firebase Authentication to implement social login.
I have one question here. Let's say the two apps are A_app and B_app respectively, and each has a Google login implementation using Firebase Authentication.
In this case, a user registers as a member using Google Login in A_app. Then, a UID is issued to the new user.
Next, the same user tries to sign up with Google login in B_app. Then the same user tries to sign up with Google login in B_app. Since he has already signed up with the same Google account in A_app, will he be logged in immediately in B_app? If that happens, do we need to design it so that the user has to register in a different way in B_app than in A_app?
Even if the devices are the same, is there any way in Firebase Authentication to identify them by app ID or other means and issue individual UIDs?
I would appreciate it if you could tell me.
Solution 1:[1]
Since he has already signed up with the same Google account in A_app, will he be logged in immediately in B_app?
Yes, it will.
If that happens, do we need to design it so that the user has to register in a different way in B_app than in A_app?
No, there is no need for doing something special.
Even if the devices are the same, is there any way in Firebase Authentication to identify them by app ID or other means and issue individual UIDs?
No, Firebase Authentication it's not related in any way to the device on which the user performs the authentication. If you need, however, to identify the users according to the device they are using, then you should consider saving user data along with the device ID, either in Cloud Firestore or in the Realtime Database. If you also need to have some constrains, please also consider using Security Rules.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alex Mamo |
