fix(auth): pre-fill email when "Continue as" button is tapped (#2423) - #2425
Open
just1and0 wants to merge 4 commits into
Open
fix(auth): pre-fill email when "Continue as" button is tapped (#2423)#2425just1and0 wants to merge 4 commits into
just1and0 wants to merge 4 commits into
Conversation
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.
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AuthMethodPickerdisplayed the saved email/identifier but discarded it on click — the user landed on a blank email form identical to tapping the regular provider button.onContinueAsSelectedcallback toAuthMethodPickerthat carries the saved identifier through toEmailAuthScreen, which now pre-fills the email field with the saved address.Fixes #2423
My.Movie.2.mp4
Test plan
customLayoutstill work (they don't receiveonContinueAsSelected)