GetSignInWithGoogleOption

class GetSignInWithGoogleOption : GetCustomCredentialOption


A request to retrieve user's Google ID Token from an explicit 'Sign in with Google' button.

Credential Provider that wishes to serve this credential type must check if the incoming GetCustomCredentialOption has type GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_CREDENTIAL and the corresponding requestData and candidateQueryData must have the key GoogleIdTokenCredential.BUNDLE_KEY_GOOGLE_ID_TOKEN_SUBTYPE with the value set as GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_SIWG_CREDENTIAL

Throws
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException

If serverClientId is empty

com.google.android.libraries.identity.googleid.GoogleIdTokenParsingException: com.google.android.libraries.identity.googleid.GoogleIdTokenParsingException

If any error encountered in creating GetSignInWithGoogleOption from bundle.

Summary

Nested types

Builder class for GetSignInWithGoogleOption

Public companion functions

GetSignInWithGoogleOption

Helper function to create GetSignInWithGoogleOption out of given Bundle.

Public constructors

GetSignInWithGoogleOption(
    serverClientId: String,
    hostedDomainFilter: String?,
    nonce: String?
)

Public properties

String?

hosted domain filter (e.g. myuniveristy.edu)

String?

the nonce to use during ID token generation

String

the client ID of the server to which the ID token will be issued

Public companion functions

createFrom

fun createFrom(data: Bundle): GetSignInWithGoogleOption

Helper function to create GetSignInWithGoogleOption out of given Bundle.

Parameters
data: Bundle

Bunble that contains all the necessary information about GetSignInWithGoogleOption.

Public constructors

GetSignInWithGoogleOption

GetSignInWithGoogleOption(
    serverClientId: String,
    hostedDomainFilter: String? = null,
    nonce: String? = null
)

Public properties

hostedDomainFilter

val hostedDomainFilterString?

hosted domain filter (e.g. myuniveristy.edu)

nonce

val nonceString?

the nonce to use during ID token generation

serverClientId

val serverClientIdString

the client ID of the server to which the ID token will be issued