Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CredentialManager for Google Sign-In #311

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

cbeyls
Copy link
Contributor

@cbeyls cbeyls commented Apr 29, 2024

GoogleSignIn from play-services-auth is deprecated. This replaces it with the CredentialManager API from the Jetpack Credentials library configured with GoogleId to retrieve the Google Id token supplied to Firebase.

The entire sign-in (and sign-out) process runs inside a single coroutine. There is no need to switch to another dispatcher because all the code is asynchronous and main-safe.

A different sign-in dialog is shown to the user but the functionality remains the same.

Note: the Wear app keeps using GoogleSignIn because no alternative exists for Wear yet and the Horologist authentication UI is based on GoogleSignIn.

# Conflicts:
#	androidApp/src/main/java/fr/paug/androidmakers/MainActivity.kt
#	gradle/libs.versions.toml
@martinbonnin martinbonnin merged commit 53fe3a9 into paug:main Apr 30, 2024
1 check passed
@cbeyls cbeyls deleted the refactor/google_credential_manager branch May 2, 2024 15:56
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.

2 participants