GoogleIdTokenCredential

class GoogleIdTokenCredential : CustomCredential


Represents the user's Google ID Token granted by the user for app sign-in.

Throws
java.lang.NullPointerException: java.lang.NullPointerException

If any of id or idToken is null.

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException

If any of id or idToken is empty

Summary

Nested types

A builder for GoogleIdTokenCredential

Constants

const String

The constant used as a key in the SignInWithGoogleOption request and candidate data bundles, to distinguish SignInWithGoogleOption from GetGoogleIdTokenOption.

const String

A constant represents the type of Google ID Token Credential.

const String

A constant represents the type of Google ID Token Credential rerieved from SiWG button.

Public companion functions

GoogleIdTokenCredential

Public constructors

GoogleIdTokenCredential(
    id: String,
    idToken: String,
    displayName: String?,
    familyName: String?,
    givenName: String?,
    profilePictureUri: Uri?,
    phoneNumber: String?
)

Public properties

String?

display name to show on the entry.

String?

user's family name.

String?

user's given name.

String

the email address associated with user's Google Account.

String

user's Google ID Toekn.

String?

This property is deprecated. Phone number will no longer be supported.

Uri?

user's profile picture uri.

Constants

BUNDLE_KEY_GOOGLE_ID_TOKEN_SUBTYPE

const val BUNDLE_KEY_GOOGLE_ID_TOKEN_SUBTYPEString

The constant used as a key in the SignInWithGoogleOption request and candidate data bundles, to distinguish SignInWithGoogleOption from GetGoogleIdTokenOption. While both aforementioned options have the type TYPE_GOOGLE_ID_TOKEN_CREDENTIAL, SignInWithGoogleOption has a sub-type TYPE_GOOGLE_ID_TOKEN_SIWG_CREDENTIAL encoded against this key.

TYPE_GOOGLE_ID_TOKEN_CREDENTIAL

const val TYPE_GOOGLE_ID_TOKEN_CREDENTIALString

A constant represents the type of Google ID Token Credential.

TYPE_GOOGLE_ID_TOKEN_SIWG_CREDENTIAL

const val TYPE_GOOGLE_ID_TOKEN_SIWG_CREDENTIALString

A constant represents the type of Google ID Token Credential rerieved from SiWG button.

Public companion functions

createFrom

fun createFrom(data: Bundle): GoogleIdTokenCredential

Public constructors

GoogleIdTokenCredential

GoogleIdTokenCredential(
    id: String,
    idToken: String,
    displayName: String?,
    familyName: String?,
    givenName: String?,
    profilePictureUri: Uri?,
    phoneNumber: String?
)

Public properties

displayName

val displayNameString?

display name to show on the entry.

familyName

val familyNameString?

user's family name.

givenName

val givenNameString?

user's given name.

id

val idString

the email address associated with user's Google Account.

idToken

val idTokenString

user's Google ID Toekn.

phoneNumber

val phoneNumberString?

user's stored phone number.

profilePictureUri

val profilePictureUriUri?

user's profile picture uri.