fix(e2e): wait for linked provider, not just AuthState.Success, in credential linking tests - #2455
fix(e2e): wait for linked provider, not just AuthState.Success, in credential linking tests#2455demolaf wants to merge 10 commits into
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)
…edential linking tests
There was a problem hiding this comment.
Code Review
This pull request refactors the authentication flow lifecycle in FirebaseUI, introducing a distinct AuthState.Aborted state to separate flow-level aborts from operation-level cancellations. It also transitions phone verification to a Flow-based API to prevent dropped callbacks and fixes a bug where the TopLevelDialogController was prematurely recreated. The review feedback suggests restoring the 'Sign Up' button in a disabled state (rather than hiding it) when new registrations are disabled, and localizing the hardcoded phone verification cooldown error message using string resources.
| if (provider.isNewAccountsAllowed) { | ||
| Button( | ||
| onClick = { | ||
| onGoToSignUp() | ||
| }, | ||
| enabled = provider.isNewAccountsAllowed && !isLoading, | ||
| enabled = !isLoading, | ||
| ) { | ||
| Text(stringProvider.signupPageTitle.uppercase()) | ||
| } | ||
| Spacer(modifier = Modifier.width(16.dp)) | ||
| } |
There was a problem hiding this comment.
Hiding the 'Sign Up' button when new accounts are not allowed could be confusing for users who might expect to see it. The previous implementation, which showed a disabled button with an explanatory tooltip, provided clearer feedback. It would be better to restore the behavior of showing the button in a disabled state. If re-adding the tooltip is not desired, simply rendering a disabled button is preferable to hiding it.
Button(
onClick = { onGoToSignUp() },
enabled = provider.isNewAccountsAllowed && !isLoading,
) {
Text(stringProvider.signupPageTitle.uppercase())
}
Spacer(modifier = Modifier.width(16.dp))
| message = "Please wait $remainingCooldownSeconds second$plural " + | ||
| "before verifying the same phone number again. The cooldown " + | ||
| "period is ${provider.timeout} seconds.", |
There was a problem hiding this comment.
This user-facing error message is hardcoded. To support internationalization, it should be retrieved from string resources. Consider adding a new string resource for the cooldown message and using it here. For example, you could add fui_phone_verification_cooldown to your strings.xml and use it with stringProvider.
No description provided.