skip to Main Content

The Firebase Authentication has 5 user fields: Identifier, Providers, Created, Signed in, and User UID. What is the purpose of Identifier?

I am in the process of integrating SSO with Firebase using OIDC. The third-party does not provide an email address, so the Identifier field in Firebase is populated with a JSON object with the users name (e.g. {"first": "John", "last": "Doe"}). It is entirely possible that two users will have the same first and last name and therefore have the same identifier. Is this a problem with Firebase Authentication since the User UID is used for identification?

2

Answers


  1. The "Identifier" field that you see in the console is not required to be unique among all users in a project. It’s just something to display that should help you visually identify a user when you’re using the console. In fact, it seems this "Identifier" is not even a required field.

    For the purpose of implementing a custom auth provider, the only thing that must absolutely be unique among all users in a project is the UID.

    Login or Signup to reply.
  2. From the Firebase documentation on users in Firebase projects:

    Firebase users have a fixed set of basic properties—a unique ID, a primary email address, a name and a photo URL

    The Identifier that you mentioned is typically set to the identifier of the first/primary provider. In practice this means that it’s normally the email address of the user (as most providers use that as their primary identifier), unless the user is (or started out as) an anonymous user, in which case it’ll be empty.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search