feat(auth)!: require the multi-step auth screens to be given navigation - #2480
Open
demolaf wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors EmailAuthScreen, PhoneAuthScreen, and MfaEnrollmentScreen to always have their navigation steps driven externally by a host, removing the previous local state fallbacks. The demo activities are updated to host these screens on their own Navigation 3 back stacks, and several flaky UI tests are resolved by replacing arbitrary sleeps and state sampling with explicit waits on reported steps. Feedback was provided regarding PhoneAuthDestinations.kt, suggesting that the selectedCountry state should survive activity recreation using rememberSaveable to prevent potential mismatches between the country code and the entered phone number.
demolaf
force-pushed
the
feat/require-navigation-on-multi-step-auth-screens
branch
2 times, most recently
from
September 6, 2026 09:52
5501907 to
06613dc
Compare
demolaf
marked this pull request as ready for review
September 6, 2026 10:20
demolaf
force-pushed
the
feat/require-navigation-on-multi-step-auth-screens
branch
from
September 6, 2026 10:32
06613dc to
c3d559a
Compare
demolaf
force-pushed
the
feat/require-navigation-on-multi-step-auth-screens
branch
from
September 6, 2026 10:55
c3d559a to
d7c45c9
Compare
demolaf
force-pushed
the
feat/require-navigation-on-multi-step-auth-screens
branch
from
September 6, 2026 12:20
d7c45c9 to
ded9d4f
Compare
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.
EmailAuthScreen,PhoneAuthScreenandMfaEnrollmentScreentook their navigation parameters as nullable and fell back to internallocalMode/localStepstate when they were omitted. That fallback had no back stack and noBackHandler, so system back did nothing and the in-UI switch controls were the only way to move between steps — while the KDoc described those same parameters as a supported way to drive the screens from outside.The parameters are now required and the fallback is gone, so every caller brings real navigation. Nothing new was published to support that: both slot demos were rewritten to host the screens on their own Navigation 3 back stacks using only existing public API, which is what makes the documented capability real rather than implied.
EmailAuthSlotDemoActivity.kt/PhoneAuthSlotDemoActivity.kt: each defines its ownNavKeyand back stack, so system back steps between modes/steps instead of leaving the flow. Verified on device.@Ignored e2e tests, includingchange phone number navigates back to EnterPhoneNumber step— the back path this change reworks, which had no coverage before.EmailAuthScreen:modeandonNavigateToModeare now required.PhoneAuthScreenandMfaEnrollmentScreen:step,onNavigateToStep,onNavigateBackandflowStateare now required.EmailAuthScreenno longer shows an error dialog of its own. This only affected a caller that installedLocalTopLevelDialogControlleritself; every caller still receivesonError.Maintainer note: Fixes internal CPRN-415