Skip to content

fix(e2e): wait for linked provider, not just AuthState.Success, in credential linking tests - #2455

Draft
demolaf wants to merge 10 commits into
version-10.0.0-beta04from
fix/credential-linking-google-flake
Draft

fix(e2e): wait for linked provider, not just AuthState.Success, in credential linking tests#2455
demolaf wants to merge 10 commits into
version-10.0.0-beta04from
fix/credential-linking-google-flake

Conversation

@demolaf

@demolaf demolaf commented Aug 25, 2026

Copy link
Copy Markdown
Member

No description provided.

just1and0 and others added 10 commits August 18, 2026 10:54
…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>

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

Copy link
Copy Markdown
Contributor

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 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.

Comment on lines +224 to 234
if (provider.isNewAccountsAllowed) {
Button(
onClick = {
onGoToSignUp()
},
enabled = provider.isNewAccountsAllowed && !isLoading,
enabled = !isLoading,
) {
Text(stringProvider.signupPageTitle.uppercase())
}
Spacer(modifier = Modifier.width(16.dp))
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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))

Comment on lines +323 to +325
message = "Please wait $remainingCooldownSeconds second$plural " +
"before verifying the same phone number again. The cooldown " +
"period is ${provider.timeout} seconds.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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.

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.

2 participants