Skip to content

Access token does not contain Name upon sign-up with custom email #9171

@shasaur

Description

@shasaur

Operating System

Windows 11 Home

Environment (if applicable)

Firefox

Firebase SDK Version

12.0.0 with firebaseui 6.1.0

Firebase SDK Product(s)

Auth

Project Tooling

React Vite

Detailed Problem Description

The missing 'Name' field in the token means that upon sign-up, if a user tries to create content, they will not have the correct name (or the default / 'Anonymous' in my case) attributed to that content (since my back-end looks at that fields to gauge their display name).

This has been a long-standing problem, it's been detailed here: firebase/FirebaseUI-Android#409

I was initially on Firebase 10.12.2 where I first noticed this problem, upon updating to the latest 12.0 versioo today, it is not resolved.

Steps and code to reproduce issue

  1. Open a front-end app or repo with custom-email sign in (I specifically have the enumeration protection turned off, and the email verification + email sign-in turned off as well for now)
  2. Create an account with a custom email and enter a value for "First name and last name"
  3. After creating the account, inspect your access token
  4. Notice it doesn't have the 'Name' field
  5. Log out and log back-in, inspect the token again, and see it does have the 'Name' field

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions