Skip to content

ID is empty with GoogleIdTokenCredential via GetSignInWithGoogleOption  #98

@oiatomic

Description

@oiatomic

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions