ExternalAccount

@Serializable
data class ExternalAccount(val id: String, val identificationId: String, val provider: String, val providerUserId: String, val emailAddress: String, val approvedScopes: String, val firstName: String? = null, val lastName: String? = null, val imageUrl: String? = null, val username: String? = null, val label: String? = null, val verification: Verification? = null)

The ExternalAccount object is a model around an identification obtained by an external provider (e.g. a social provider such as Google).

External account must be verified, so that you can make sure they can be assigned to their rightful owners. The ExternalAccount object holds all necessary state around the verification process.

Constructors

Link copied to clipboard
constructor(id: String, identificationId: String, provider: String, providerUserId: String, emailAddress: String, approvedScopes: String, firstName: String? = null, lastName: String? = null, imageUrl: String? = null, username: String? = null, label: String? = null, verification: Verification? = null)

Properties

Link copied to clipboard
@SerialName(value = "approved_scopes")
val approvedScopes: String

The scopes that the user has granted access to.

Link copied to clipboard
@SerialName(value = "email_address")
val emailAddress: String

The provided email address of the user.

Link copied to clipboard
@SerialName(value = "first_name")
val firstName: String? = null

The user's first name.

Link copied to clipboard
val id: String

The unique identifier for this external account.

Link copied to clipboard
@SerialName(value = "identification_id")
val identificationId: String

The identification with which this external account is associated.

Link copied to clipboard
@SerialName(value = "image_url")
val imageUrl: String? = null

The user's image URL.

Link copied to clipboard
val label: String? = null

A descriptive label to differentiate multiple external accounts of the same user for the same provider.

Link copied to clipboard
@SerialName(value = "last_name")
val lastName: String? = null

The user's last name.

Link copied to clipboard

The provider name e.g. google

Link copied to clipboard
@SerialName(value = "provider_user_id")
val providerUserId: String

The unique ID of the user in the provider.

Link copied to clipboard
val username: String? = null

The user's username.

Link copied to clipboard

An object holding information on the verification of this external account.

Functions

Link copied to clipboard

Deletes this external account from the user's profile.

Link copied to clipboard

Reauthorizes this external account by refreshing its verification status.

Link copied to clipboard

Revokes the access tokens associated with this external account.