Skip to content

fix(auth)!: remove the sign-in controls made redundant by per-step navigation - #2482

Open
demolaf wants to merge 7 commits into
feat/require-navigation-on-multi-step-auth-screensfrom
feat/require-navigation-followups
Open

fix(auth)!: remove the sign-in controls made redundant by per-step navigation#2482
demolaf wants to merge 7 commits into
feat/require-navigation-on-multi-step-auth-screensfrom
feat/require-navigation-followups

Conversation

@demolaf

@demolaf demolaf commented Sep 6, 2026

Copy link
Copy Markdown
Member

#2480 made every email mode its own destination, but three in-form controls still duplicated what system back does — and back itself fell short in two places, so removing them first would have made the flow worse.

Back now does the whole job: off phone code entry it runs the same teardown "change number" does, so a late auto-verification can no longer sign the user in on the number they just abandoned; and when it reveals an email step it keeps the address typed so far instead of emptying the field. With that true, the three controls are redundant and go.

  • SignUpUI.kt / ResetPasswordUI.kt: the SIGN IN action-row buttons are removed — the reset-link dialog's dismiss still navigates to sign-in.
  • SignInEmailLinkUI.kt: the SIGN IN WITH PASSWORD toggle and its divider are removed. SignInUI's email-link toggle stays, being the only way into that mode.
  • PhoneAuthScreenTest.kt: zero-pad the generated German mobile number — unpadded it was an invalid length for ~2.8h out of every 27.8h, failing that test deterministically inside the window.

Two harnesses drove the modes from a plain variable rather than a back stack, one of them pinning the resulting password carry-over as expected behaviour; both now host on a real NavDisplay, which is what lets the removals stand. The full unit and e2e suites pass.

⚠️ Breaking Changes

  • SignUpUI and SignInEmailLinkUI: onGoToSignIn removed.
  • FirebaseAuthTestTags: SignUp.SIGN_IN_BUTTON, ResetPassword.SIGN_IN_BUTTON and EmailLink.PASSWORD_SIGN_IN_BUTTON removed.
  • AuthUIStringProvider: signInWithPassword removed, along with its 85 translations.

Preview

Sign up

Before After
before-1-signup after-1-signup

Recover password

Before After
before-2-reset-password after-2-reset-password

Email-link sign-in

Before After
before-3-email-link after-3-email-link

Maintainer note: Fixes internal CPRN-408, CPRN-410

@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 screens (EmailAuthScreen, PhoneAuthScreen, and MfaEnrollmentScreen) to delegate their navigation state (current mode or step) entirely to the hosting environment using a real back stack (e.g., Navigation 3). Local step and mode state, along with in-form navigation buttons, have been removed in favor of system back-press handling and host-driven navigation. Additionally, verification teardown has been unified so that backing out of code entry properly cancels the verification in flight. Tests and demo activities have been updated to host these screens using the new back-stack pattern, and several flaky tests have been stabilized. There are no review comments provided, so I have no additional feedback to offer.

@demolaf
demolaf force-pushed the feat/require-navigation-followups branch from 7cc73df to 04ed088 Compare September 6, 2026 13:59
@demolaf demolaf changed the title fix(auth)!: drop the sign-in controls system back now replaces fix(auth)!: remove the sign-in controls made redundant by per-step navigation Sep 6, 2026
@demolaf
demolaf force-pushed the feat/require-navigation-followups branch from 04ed088 to d9b2cc2 Compare September 6, 2026 21:51
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