# 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             | Type                     | Description                                                                                               |
| ---------------- | ------------------------ | --------------------------------------------------------------------------------------------------------- |
| id               | string                   | The unique identifier for this external account.                                                          |
| identificationId | string                   | The identification with which this external account is associated.                                        |
| provider         | string                   | The provider name (e.g., google).                                                                         |
| providerUserId   | string                   | The unique ID of the user in the provider.                                                                |
| emailAddress     | string                   | The user's email address.                                                                                 |
| approvedScopes   | string                   | The scopes that the user has granted access to.                                                           |
| firstName        | string                   | The user's first name.                                                                                    |
| lastName         | string                   | The user's last name.                                                                                     |
| imageUrl         | string                   | The user's image URL.                                                                                     |
| username         | string | null           | The user's username. Only supported if username is enabled in the instance settings.                      |
| phoneNumber      | string | null           | The phone number related to this specific external account.                                               |
| publicMetadata   | Record<string, unknown> | Metadata that can be read from the Frontend API and Backend API and can be set only from the Backend API. |
| label            | string | null           | A descriptive label to differentiate multiple external accounts of the same user for the same provider.   |
| verification     | VerificationResource     | An object holding information on the verification of this external account.                               |

## Methods

### `reauthorize()`

Invokes a re-authorization flow for an existing external account.

```typescript
function reauthorize(params: ReauthorizeExternalAccountParams): Promise<ExternalAccount>
```

#### `ReauthorizeExternalAccountParams`

| Name             | Type      | Description                                                                                                                                                                                                                                                                                                            |
| ---------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| additionalScopes | string[] | Additional scopes for your user to be prompted to approve.                                                                                                                                                                                                                                                             |
| redirectUrl      | string    | 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-callback route that calls Clerk.handleRedirectCallback or mounts the <AuthenticateWithRedirectCallback /> component. See the custom flow for implementation details. |
| oidcPrompt?      | string    | The value to pass to the OIDC prompt parameter in the generated OAuth redirect URL.                                                                                                                                                                                                                                    |
| oidcLoginHint?   | string    | The value to pass to the OIDC login\_hint parameter in the generated OAuth redirect URL.                                                                                                                                                                                                                               |

### `destroy()`

Deletes this external account.

```typescript
function destroy(): Promise<void>
```

### `providerSlug()`

A getter method for the `provider` attribute.

```typescript
function providerSlug(): string
```

### `providerTitle()`

Returns the title of the provider with the word "Account" appended.

EG: if `google` is passed as the parameter, `Google Account` will be returned.

```typescript
function providerTitle(): string
```

### `accountIdentifier()`

Returns the identifier of the account, which can be one of the following:

- `username` if present
- `emailAddress` if present
- `label`

```typescript
function accountIdentifier(): string
```

---

## Sitemap

[Overview of all docs pages](https://clerk.com/docs/llms.txt)
