GetGoogleIdOption

class GetGoogleIdOption : GetCustomCredentialOption


A request to retrieve user's Google ID Token.

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

If serverClientId is empty

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException

If both filterByAuthorizedAccounts and requestVerifiedPhoneNumber are true.

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

If any error encountered in creating GetGoogleIdOption from bundle.

Summary

Nested types

A Builder for GetGoogleIdOption.

Public companion functions

GetGoogleIdOption

Helper function to create GetGoogleIdOption out of given Bundle.

Public constructors

GetGoogleIdOption(
    serverClientId: String,
    nonce: String?,
    filterByAuthorizedAccounts: Boolean,
    linkedServiceId: String?,
    idTokenDepositionScopes: List<String>?,
    requestVerifiedPhoneNumber: Boolean,
    autoSelectEnabled: Boolean
)

Public properties

Boolean

sets the auto-select behavior in the request. sign-ups.

Boolean

whether to only allow the user to select from Google accounts that are already authorized to sign in to your application, default value is true

List<String>?

Oauth scopes that Google will need to deposit a Google ID token to your application's backend server.

String?

service ID used when linking accounts to a Google account

String?

the nonce to use during ID token generation

Boolean

whether to request for a verified phone number during sign-ups.

String

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

Public companion functions

createFrom

fun createFrom(data: Bundle): GetGoogleIdOption

Helper function to create GetGoogleIdOption out of given Bundle.

Parameters
data: Bundle

Bunble that contains all the necessary information about GetGoogleIdOption.

Public constructors

GetGoogleIdOption

GetGoogleIdOption(
    serverClientId: String,
    nonce: String? = null,
    filterByAuthorizedAccounts: Boolean = true,
    linkedServiceId: String? = null,
    idTokenDepositionScopes: List<String>? = null,
    requestVerifiedPhoneNumber: Boolean = false,
    autoSelectEnabled: Boolean = false
)

Public properties

autoSelectEnabled

val autoSelectEnabledBoolean

sets the auto-select behavior in the request. sign-ups.

filterByAuthorizedAccounts

val filterByAuthorizedAccountsBoolean

whether to only allow the user to select from Google accounts that are already authorized to sign in to your application, default value is true

idTokenDepositionScopes

val idTokenDepositionScopesList<String>?

Oauth scopes that Google will need to deposit a Google ID token to your application's backend server. This is optional and can be set to null. Only required if Google requires particular scopes to be able to deposit the ID token.

linkedServiceId

val linkedServiceIdString?

service ID used when linking accounts to a Google account

nonce

val nonceString?

the nonce to use during ID token generation

requestVerifiedPhoneNumber

val requestVerifiedPhoneNumberBoolean

whether to request for a verified phone number during sign-ups.

serverClientId

val serverClientIdString

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