> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# linkOAuthProvider

[API Reference](/api-reference/modelence/client/functions/../../../index) / [modelence](/api-reference/modelence/client/functions/../../index) / [client](/api-reference/modelence/client/functions/../index) / linkOAuthProvider

> **linkOAuthProvider**(`options`): `Promise`\<`void`>

Defined in: [packages/modelence/src/auth/client/index.ts:201](https://github.com/modelence/modelence/blob/f614ecc6811cdda9670d612872c8ff49a49c5e28/packages/modelence/src/auth/client/index.ts#L201)

Link an OAuth provider to the currently signed-in user's account.
Redirects the browser to the OAuth provider's authorization page.
The provider will redirect back and the account will be linked.

## Example

```ts theme={null}
linkOAuthProvider({ provider: 'google' });
```

## Parameters

| Parameter          | Type                                       | Description                                        |
| ------------------ | ------------------------------------------ | -------------------------------------------------- |
| `options`          | \{ `provider`: `"google"` \| `"github"`; } | -                                                  |
| `options.provider` | `"google"` \| `"github"`                   | The OAuth provider to link ('google' or 'github'). |

## Returns

`Promise`\<`void`>
