Skip to content

fix(react): ensure that display name is updated upon sign up if requireDisplayName() behaviour is invoked#1346

Draft
russellwheatley wants to merge 5 commits intomainfrom
fix-sign-up-display-name
Draft

fix(react): ensure that display name is updated upon sign up if requireDisplayName() behaviour is invoked#1346
russellwheatley wants to merge 5 commits intomainfrom
fix-sign-up-display-name

Conversation

@russellwheatley
Copy link
Copy Markdown
Member

@russellwheatley russellwheatley commented Mar 26, 2026

  • onAuthStateChanged now waits for onSignUp call handler to complete so that display name can be updated first.

fixes #1344

Here's React example app with requireDisplayName() behaviour enabled:

Screen.Recording.2026-03-26.at.15.57.36.mov

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a deduplication mechanism for sign-up events in the SignUpAuthScreen component across both the react and shadcn packages. By utilizing a useRef to track handled user IDs and making the useOnUserAuthenticated hook conditional, the implementation ensures that sign-up callbacks are not triggered redundantly when the form itself handles the success. The changes also include comprehensive test updates to verify the new deduplication logic and hook behavior. Review feedback suggests enhancing type safety in test mocks and maintaining type consistency for the user parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DisplayName is null onAuthStateChanged when creating a user using SignUpAuthScreen

1 participant