voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
30 lines (17 loc) • 836 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/auth](./auth.md) > [linkWithCredential](./auth.linkwithcredential.md)
## linkWithCredential() function
Links the user account with the given credentials.
<b>Signature:</b>
```typescript
export declare function linkWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| user | [User](./auth.user.md) | The user. |
| credential | [AuthCredential](./auth.authcredential.md) | The auth credential. |
<b>Returns:</b>
Promise<[UserCredential](./auth.usercredential.md)<!-- -->>
## Remarks
An [AuthProvider](./auth.authprovider.md) can be used to generate the credential.