Migration from GoogleSignIn to Credential Manager. Get 'idToken' silently
I'm trying to migrate from GoogleSignIn to Credential Manager. GoogleSignIn implementation After authetication, I need to know idToken from time to time to make a request to our server val googleSignInClient = GoogleSignIn.getClient( context, GoogleApiClientHelper.generateGoogleSignInOptions() ) val silentSignIn = googleSignInClient.silentSignIn() if (!silentSignIn.isSuccessful || silentSignIn.result.isExpired) { throw IllegalStateException("Could not receive idToken") } val idToken = silentSignIn.result.idToken put("Authorization", "Bearer $idToken") where GoogleApiClientHelper.generateGoogle
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.