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

# AccessToken Provider

> Manage authentication across components.

<div />

See the [Authentication](/docs/embeddable-ui/authentication) section for more information on how to use the Access Token Provider.

```jsx theme={"system"}
<AccessTokenProvider fetchToken={fetchToken}>
  // Components
</AccessTokenProvider>
```

<div className="flex justify-center gap-8 mt-2">
  <a href="https://github.com/propeldata/ui-kit/blob/main/packages/ui-kit/src/components/AccessTokenProvider/AccessTokenProvider.tsx" target="_blank" className="flex items-center gap-2 text-xs">
    <Icon icon="github" size={18} />

    GitHub

    <Icon icon="arrow-up-right-from-square" size={12} />
  </a>
</div>

## Props API

<ParamField path="fetchToken" type={`() => Promise<string>`}>
  Function that the provider will use to fetch the access token.
</ParamField>

<ParamField path="accessToken" type={`string`}>
  If passed, the provider will ignore the `fetchToken` function and pass this access token to all the children components.
</ParamField>
