You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val credentialManager = androidx.credentials.CredentialManager.create(context)
91
+
val googleIdOption = com.google.android.libraries.identity.googleid.GetGoogleIdOption.Builder()
92
+
.setFilterByAuthorizedAccounts(false)
93
+
.setServerClientId("AutoNodeAi")
94
+
.setAutoSelectEnabled(false)
95
+
.build()
96
+
val request = androidx.credentials.GetCredentialRequest.Builder()
97
+
.addCredentialOption(googleIdOption)
98
+
.build()
99
+
val result = credentialManager.getCredential(context, request)
100
+
val credential = result.credential
101
+
if (credential is androidx.credentials.CustomCredential&& credential.type == com.google.android.libraries.identity.googleid.GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_CREDENTIAL) {
102
+
val googleIdTokenCredential = com.google.android.libraries.identity.googleid.GoogleIdTokenCredential.createFrom(credential.data)
0 commit comments