android / android/identity-samples
ID is empty with GoogleIdTokenCredential via GetSignInWithGoogleOption
- Dominant language
- Kotlin
- Stars
- 515
- Forks
- 283
- Avg merge
- 9h 37m
- Merged PRs (30d)
- 2
Description
We already have an android app with a lot of users signed in with Google using the previous google auth,
We migrated to CredentialManager in the last release using version 1.2.2
The google sign in request that we make
```
val signInWithGoogleIdOption = GetSignInWithGoogleOption
.Builder(apiKey)
.build()
val request: GetCredentialRequest = GetCredentialRequest
.Builder()
.addCredentialOption(signInWithGoogleIdOption)
.build()
```
For one QA account we always get the email as BLANK inside the Id param of GoogleIdTokenCredential after moving away from legacy/deprecated GoogleSignIn (it worked fine with the previous Google Signin process) For other accounts that we have it's working fine!
```
val credentials = handleCredentials(result.credential)
credentials?.id?.takeIf { it.isEmpty().not() }?.let {
return credentials
} ?: throw Exception("Email address was not shared during Google Login!")
```
so the code always goes into the exception state.
What do you recommend here ? Also this behaviour from Google's is not acceptable since out app is already in release and there is no proper documentation as to why its not working for that user! . 🤕
PS: I had to send a force update to the user just because google wanted me to migrate to credential manager which itself is immature atm ? What do i do ?
Contributor guide
Research direction
No repository file or test is named; start by reproducing the flow around GetSignInWithGoogleOption and GoogleIdTokenCredential with the affected QA account on CredentialManager 1.2.2. Done means identifying a reliable cause or documenting the supported handling for an empty id, with the relevant sample or test location identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100