Version 10.0.0 beta04 - #2453
Conversation
…e with tooltip. BREAKING - Removed unused `newAccountsDisabledTooltip` from public interface `AuthUIStringProvider` (#2397)
…#2425) * fix(auth): pre-fill email when "Continue as" button is tapped (#2423) 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. * fix(auth): only pre-fill email for Email provider, not phone/other * fix(auth): move new parameters to end of signature to preserve API compat * fix(auth): address review feedback for prefill email feature - Update kDoc to say "email address" instead of "phone number" since phone pre-fill is not wired up in this PR - Add SignInUITest with assertions for email pre-fill behavior * test(auth): cover AuthMethodPicker Continue-as button and onContinueAsSelected callback --------- Co-authored-by: demolaf <demolafadumo@gmail.com>
…a onSignInFailure (#2433)
There was a problem hiding this comment.
Code Review
This pull request refactors the authentication flow lifecycle and state management in FirebaseUI Auth. It introduces a new AuthState.Aborted state to distinguish between full-flow cancellations and operation-level cancellations (AuthState.Cancelled), ensuring the UI remains open when a user backs out of a single provider. Additionally, phone verification is refactored from a single-shot suspending function to a Flow-based stream to handle multi-shot callbacks properly, and transient states are marked with an isNotification flag to prevent them from leaking to new screens. Feedback on the changes suggests resetting all mode-specific state flags (emailSignInLinkSentLocal and resetLinkSentLocal) when navigating between email authentication modes to avoid stale UI states.
| onGoToSignIn = { | ||
| textValues.forEach { it.value = "" } | ||
| mode.value = EmailAuthMode.SignIn | ||
| emailSignInLinkSentLocal = false | ||
| }, | ||
| onGoToResetPassword = { | ||
| textValues.forEach { it.value = "" } | ||
| mode.value = EmailAuthMode.ResetPassword | ||
| resetLinkSentLocal = false | ||
| }, | ||
| onGoToEmailLinkSignIn = { | ||
| textValues.forEach { it.value = "" } | ||
| mode.value = EmailAuthMode.EmailLinkSignIn | ||
| emailSignInLinkSentLocal = false | ||
| }, |
There was a problem hiding this comment.
When switching between email authentication modes (Sign In, Sign Up, Reset Password, Email Link), it's safer to reset all mode-specific state flags (emailSignInLinkSentLocal and resetLinkSentLocal). Currently, you only reset the flag relevant to the source mode, which could lead to stale UI state if the user navigates back and forth between different flows. Resetting both flags in each navigation callback ensures a clean state.
onGoToSignIn = {
textValues.forEach { it.value = "" }
mode.value = EmailAuthMode.SignIn
emailSignInLinkSentLocal = false
resetLinkSentLocal = false
},
onGoToResetPassword = {
textValues.forEach { it.value = "" }
mode.value = EmailAuthMode.ResetPassword
emailSignInLinkSentLocal = false
resetLinkSentLocal = false
},
onGoToEmailLinkSignIn = {
textValues.forEach { it.value = "" }
mode.value = EmailAuthMode.EmailLinkSignIn
emailSignInLinkSentLocal = false
resetLinkSentLocal = false
},
This replaces #2384 which was unmergeable due to force-pushes.
EDIT: Replacing the PR didn't fix the ability to merge.
newAccountsDisabledTooltipfrom public interfaceAuthUIStringProvider#2397CancelledandAborted#2440Changes
fix(internal): append CHAR_LIMIT to translation descriptions in export script #2417
fix(auth): mitigate tapjacking on the auth activity window #2416
sample(app): add Firestore, Database & Storage demos to sample app #2406
fix(auth): allow customizing top app bar colors via AuthUITheme #2391
fix(auth): handle edge-to-edge insets in MFA challenge and auth screens #2413
fix(auth): stale one-off AuthState no longer leaks across screen instances #2415