ExternalAccount
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.
Properties
- Name
- id
- Type
- string
- Description
- The unique identifier for this external account. 
 
- Name
- identificationId
- Type
- string
- Description
- The identification with which this external account is associated. 
 
- Name
- provider
- Type
- string
- Description
- The provider name (e.g., - google).
 
- Name
- providerUserId
- Type
- string
- Description
- The unique ID of the user in the provider. 
 
- Name
- emailAddress
- Type
- string
- Description
- The user's email address. 
 
- Name
- approvedScopes
- Type
- string[]
- Description
- The scopes that the user has granted access to. 
 
- Name
- firstName
- Type
- string
- Description
- The user's first name. 
 
- Name
- lastName
- Type
- string
- Description
- The user's last name. 
 
- Name
- imageUrl
- Type
- string
- Description
- The user's image URL. 
 
- Name
- username
- Type
- string | null
- Description
- The user's username. Only supported if username is enabled in the instance settings. 
 
- Name
- phoneNumber
- Type
- string | null
- Description
- The phone number related to this specific external account. 
 
- Name
- publicMetadata
- Type
- Record<string, unknown>
- Description
- Metadata that can be read from the Frontend API and Backend API and can be set only from the Backend API. 
 
- Name
- label
- Type
- string | null
- Description
- A descriptive label to differentiate multiple external accounts of the same user for the same provider. 
 
- Name
- verification
- Type
- Verification
- Description
- An object holding information on the verification of this external account. 
 
function reauthorize(params: ReauthorizeExternalAccountParams): Promise<ExternalAccount>- Name
- additionalScopes
- Type
- string[]
- Description
- Additional scopes for your user to be prompted to approve. 
 
- Name
- redirectUrl
- Type
- string
- Description
- The full URL or path that the OAuth provider should redirect to on successful authorization on their part. Typically, this will be a simple - /sso-callbackroute that calls- Clerk.handleRedirectCallbackor mounts the <AuthenticateWithRedirectCallback /> component. See the custom flow for implementation details.
 
- Name
- oidcPrompt?
- Type
- string
- Description
- The value to pass to the OIDC - promptparameter in the generated OAuth redirect URL.
 
- Name
- oidcLoginHint?
- Type
- string
- Description
- The value to pass to the OIDC - login_hintparameter in the generated OAuth redirect URL.
 
destroy()
Deletes this external account.
function destroy(): Promise<void>providerSlug()
A getter method for the provider attribute.
function providerSlug(): stringproviderTitle()
Returns the title of the provider with the word "Account" appended.
EG: if google is passed as the parameter, Google Account will be returned.
function providerTitle(): stringaccountIdentifier()
Returns the identifier of the account, which can be one of the following:
- usernameif present
- emailAddressif present
- label
function accountIdentifier(): stringFeedback
Last updated on