Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Any way to log in with google and CredentialManager? #764

Puskistolero92 started this conversation in General
Discussion options

hi i am trying to log in with google and its one tap using credential manager but i have not found the way to do it.
do you have to do it from the common part or with expect/actual?

You must be logged in to vote

Replies: 1 comment

Comment options

@Puskistolero92 if your firebase users have google accounts linked to them, then theres a few ways to implement the Google sign in step, but this library doesn't manage that for you as far as I know. Theres a few guides on how to implement Google single sign on such as:

https://medium.com/@arezoo.nazerdeylami/implementing-google-sign-in-with-kotlin-and-compose-multiplatform-8fad1898b866
https://proandroiddev.com/integrating-google-sign-in-into-kotlin-multiplatform-8381c189a891
https://euryperez.dev/compose-multiplatform-login-with-google-cc3217a99349

And a library that can help is https://github.com/mirzemehdi/KMPAuth

After the google single sign on is complete, your app receives an id_token and access_token, and to log into the firebase user you can do the something like:

import dev.gitlive.firebase.auth.FirebaseAuth
import dev.gitlive.firebase.auth.GoogleAuthProvider
val tokenResult = googleAuth.signIn() // implementation you chose for google single sign in
val cred = GoogleAuthProvider.credential(tokenResult.idToken, tokenResult.accessToken)
val firebaseResult = auth.signInWithCredential(cred)
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Converted from issue

This discussion was converted from issue #725 on August 20, 2025 10:29.

AltStyle によって変換されたページ (->オリジナル) /