Skip to content

fix(auth): pre-fill email when "Continue as" button is tapped (#2423) - #2425

Open
just1and0 wants to merge 4 commits into
version-10.0.0-beta04from
fix/2423-continue-as-prefill-email
Open

fix(auth): pre-fill email when "Continue as" button is tapped (#2423)#2425
just1and0 wants to merge 4 commits into
version-10.0.0-beta04from
fix/2423-continue-as-prefill-email

Conversation

@just1and0

@just1and0 just1and0 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The "Continue as…" button in AuthMethodPicker displayed the saved email/identifier but discarded it on click — the user landed on a blank email form identical to tapping the regular provider button.
  • Added an onContinueAsSelected callback to AuthMethodPicker that carries the saved identifier through to EmailAuthScreen, which now pre-fills the email field with the saved address.
  • Regular provider button taps clear the pre-fill so the two paths remain distinct.

Fixes #2423

My.Movie.2.mp4

Test plan

  • Sign in with email, sign out, return to the auth method picker
  • Tap the "Continue as " button — verify the email field is pre-filled with the saved address
  • Tap the regular "Sign in with email" button below the divider — verify the email field is empty
  • Verify federated providers (Google, Facebook, etc.) are unaffected by the change
  • Verify custom layouts via customLayout still work (they don't receive onContinueAsSelected)

The "Continue as..." button displayed the saved identifier but
discarded it on click, sending the user to a blank email form.
Add an onContinueAsSelected callback to AuthMethodPicker that
carries the identifier through to EmailAuthScreen, which now
initializes the email field with the saved address.

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

Copy link
Copy Markdown

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 the ability to pre-fill the email address on the email authentication screen when a user selects the "Continue as..." option from the method picker. This is achieved by passing the saved identifier from AuthMethodPicker via a new onContinueAsSelected callback, storing it in a prefillEmail state in FirebaseAuthScreen, and passing it to EmailAuthScreen to initialize the email input field. Feedback on the changes highlights a potential issue where a non-email identifier (like a phone number) could incorrectly pre-fill the email field if the last used provider was not Email. A code suggestion is provided to only set prefillEmail when the provider is AuthProvider.Email.

Comment thread auth/src/main/java/com/firebase/ui/auth/ui/screens/FirebaseAuthScreen.kt Outdated
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.

1 participant