Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Improve ClerkProvider docs #1553

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions docs/components/clerk-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,45 @@ The `<ClerkProvider>` component must be added to your React entrypoint.

---

- `nonce?`
- `string`

This nonce value will be passed through to the `@clerk/clerk-js` script tag. You can use this to implement [strict-dynamic CSP](/docs/security/clerk-csp#implementing-a-strict-dynamic-csp).

---

- `sdkMetadata?`
- `{ name: string; version: string; environment?: string }`

Contains information about the SDK that the host application is using. You don't need to set this value yourself unless you're [developing an SDK](/docs/references/sdk/overview).

---

- `nonce?`
- `string`
- `standardBrowser?`
- `boolean`

This nonce value will be passed through to the `@clerk/clerk-js` script tag. You can use this to implement [strict-dynamic CSP](/docs/security/clerk-csp#implementing-a-strict-dynamic-csp).
By default, ClerkJS is loaded with the assumption that cookies can be set (browser setup). On native platforms this value must be set to `false`. You don't need to set this value yourself unless you're [developing an SDK](/docs/references/sdk/overview).

---

- `selectInitialSession?`
- `(client: ClientResource) => ActiveSessionResource | null`

By default, the last active session is used during client initialization. This option allows you to override that behavior, e.g. by selecting a specific session. You don't need to set this value yourself unless you're [developing an SDK](/docs/references/sdk/overview).

---

- `touchSession?`
- `boolean`

By default, the [FAPI `touch` endpoint](https://clerk.com/docs/reference/frontend-api/tag/Sessions#operation/touchSession) is called during page focus to keep the last active session alive. This option allows you to disable this behavior. You don't need to set this value yourself unless you're [developing an SDK](/docs/references/sdk/overview).
LekoArts marked this conversation as resolved.
Show resolved Hide resolved

---

- `initialState?`
- `InitialState`

Provide an initial state of the Clerk client during server-side rendering. You don't need to set this value yourself unless you're [developing an SDK](/docs/references/sdk/overview).
</Properties>

[components-ref]: /docs/components/overview
Expand Down
Loading