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

# useLinkApple

```ts theme={null}
function useLinkApple(): {
  linkApple: (options?: {
     idempotencyKey?: string;
  }) => Promise<void>;
  oauthState:   | null
     | OAuthFlowState;
};
```

A hook for linking an Apple account to the current user.
This is a convenience wrapper around useLinkOAuth for Apple provider.

## Returns

```ts theme={null}
{
  linkApple: (options?: {
     idempotencyKey?: string;
  }) => Promise<void>;
  oauthState:   | null
     | OAuthFlowState;
}
```

An object containing the linkApple function and oauthState.

| Name          | Type                                                                                                      |
| ------------- | --------------------------------------------------------------------------------------------------------- |
| `linkApple()` | (`options?`: \{ `idempotencyKey?`: `string`; }) => `Promise`\<`void`>                                     |
| `oauthState`  | \| `null` \| [`OAuthFlowState`](/sdks/cdp-sdks-v2/frontend/@coinbase/cdp-hooks/Interfaces/OAuthFlowState) |
