<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [unlink](./auth.unlink.md)

## unlink() function

Unlinks a provider from a user account.

<b>Signature:</b>

```typescript
export declare function unlink(user: User, providerId: ProviderId): Promise<User>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  user | [User](./auth.user.md) | The user. |
|  providerId | [ProviderId](./auth.providerid.md) | The provider to unlink. |

<b>Returns:</b>

Promise&lt;[User](./auth.user.md)<!-- -->&gt;

