Custom Cloud auth UI#1162
Draft
UweTrottmann wants to merge 148 commits into
Draft
Conversation
It's optional, so not enforced by Firebase and also not the other parts of the app. So remove it for now.
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.
2c031bb to
9590e6a
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.
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).