Skip to content

Commit

Permalink
feat: Improve ClerkProvider docs (#1553)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexis Aguilar <[email protected]>
  • Loading branch information
2 people authored and royanger committed Oct 8, 2024
1 parent 50a41ae commit 7b89c8f
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions docs/components/clerk-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -233,17 +233,45 @@ The `<ClerkProvider>` component must be added to your React entrypoint.
- `boolean`

**Chrome Extension only** If `true`, syncs the authentication state from the web application to the Chrome Extension. Defaults to `true`. See the [dedicated guide](/docs/references/chrome-extension/syncsessionwithtab-configuration) for more information.
- `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 Clerk Frontend API `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).

---

- `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

0 comments on commit 7b89c8f

Please sign in to comment.