feat(auth)!: migrate auth navigation to Navigation 3 - #2469
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request migrates the FirebaseUI Android Auth navigation system from Jetpack Navigation Compose to Navigation 3, introducing a serialized AuthRoute hierarchy to persist the back stack across configuration changes and process death. Feedback on the changes highlights a flaw in the phone number masking heuristic that incorrectly handles three-digit country codes, as well as an opportunity to extract the hardcoded transition duration of 700 ms into a reusable constant.
This was referenced Sep 2, 2026
demolaf
force-pushed
the
feat/auth-navigation-3
branch
from
September 2, 2026 13:17
71ea2b2 to
dd859f5
Compare
demolaf
force-pushed
the
feat/auth-navigation-3
branch
from
September 2, 2026 13:30
dd859f5 to
c43f75b
Compare
russellwheatley
force-pushed
the
feat/auth-navigation-3
branch
from
September 2, 2026 14:23
c43f75b to
cdf4db5
Compare
Base automatically changed from
feat/mfa-enrollment-per-step-nav
to
version-10.0.0-beta05
September 2, 2026 14:29
russellwheatley
force-pushed
the
feat/auth-navigation-3
branch
from
September 2, 2026 14:29
cdf4db5 to
371523d
Compare
russellwheatley
approved these changes
Sep 2, 2026
russellwheatley
left a comment
Member
There was a problem hiding this comment.
LGTM - leftover bits can follow up separately
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.
The auth module now navigates with Jetpack Navigation 3. Destinations are typed
NavKeys in aNavBackStacklist rather than string routes in aNavHost, so the address a step carries is a field on the key instead of a URI query argument, and the back stack is a plain list the library can inspect without reflection.Navigation 2 is removed outright —
api(libs.compose.navigation)is gone, replaced byapionnavigation3-runtimeandnavigation3-ui.AuthRoute.kt: extracted fromFirebaseAuthScreen, now a@Serializable sealed interfacesplit intoDestination(a realNavKey) andFlowEntry(names a flow, resolves to its start step). Also holdsresetBackStackTo,pushUniqueandpopOrNull.AuthUITransitions: threeContentTransformspecs receivingScene<NavKey>, replacing fourEnterTransition/ExitTransitionlambdas.Scene<NavKey>.authRoute()is public so a consumer can still vary the animation per destination.NavDisplaythrows on an empty back stack, so every pop goes throughpopOrNull.AuthRouteis a@Serializable sealed interface;routeandroutePatternare gone. Email steps carry their address, soAuthRoute.Email.SignUpis nowAuthRoute.Email.SignUp().Email/Phone/MfaEnrollmentareFlowEntry, not destinations.AuthRoute.Email.Step.withEmailreturns aStep, not aString.AuthUITransitionstakestransitionSpec/popTransitionSpec/predictivePopTransitionSpecinstead of the four Navigation 2 lambdas.navigation3-*transitively instead ofnavigation-compose.Usage
Maintainer note: Fixes internal CPRN-403