Skip to content

Custom Cloud auth UI#1162

Draft
UweTrottmann wants to merge 148 commits into
devfrom
custom-cloud-auth-ui
Draft

Custom Cloud auth UI#1162
UweTrottmann wants to merge 148 commits into
devfrom
custom-cloud-auth-ui

Conversation

@UweTrottmann
Copy link
Copy Markdown
Owner

@UweTrottmann UweTrottmann commented May 1, 2026

Goal: be able to migrate from deprecated Google Sign-In to Credential Manager including outdated dependencies. Be able to adapt to any future changes and more easily customize authentication.

Previously relied on the not well maintained FirebaseUI-Android auth UI component. Replace it with a custom version based on their upcoming version 10 release based on Jetpack Compose (previous version was View-based).

@UweTrottmann UweTrottmann added this to the 2026.2 milestone May 1, 2026
The LaunchedEffect(authState) is run again on config change, even if
the state remains Idle. Before this change it would then navigate away
from any shown screen to the method picker. However, there is no need
to navigate to the picker when state is or changes to Idle. The
initial screen is already defined as the picker by NavHost. And when
operations change to Idle the screen should remain the same (or only
change to Success once the user was loaded).
As LaunchedEffect(errorState) is run again after a config change, the
error dialog was shown again. So change to change back to Idle state
after the dialog was dismissed. Also avoid any side effects of changing
to Idle by not clearing any remembered values (the actual screens
relying on these already clear them in callbacks once done using them).

Also rely on the error state directly to avoid having to save the
exception instance across config changes.
Before, when returning to the reset screen the dialog would show up
again and return to the sign in screen on dismissal, effectively
blocking sending a reset email again.
The option can't be used with AuthUITheme.fromMaterialTheme() anyhow as
it needs to be called inside a composable function. But you typically
want to construct the configuration outside of a composable.
Authorization should be handled separately from sign-in:
https://developer.android.com/identity/sign-in/legacy-gsi-migration

Regardless, the current implementation didn't do anything anyhow.
@UweTrottmann UweTrottmann force-pushed the custom-cloud-auth-ui branch from 2c031bb to 9590e6a Compare May 1, 2026 08:51
@UweTrottmann UweTrottmann changed the title Custom cloud auth UI Custom Cloud auth UI May 3, 2026
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