Skip to content

Commit e2e9970

Browse files
brkalowalexisintechpanteliselefLekoArts
authored andcommitted
feat: adds telemetry page (#496)
Co-authored-by: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Co-authored-by: panteliselef <panteliselef@outlook.com> Co-authored-by: Lennart <lekoarts@gmail.com>
1 parent 869faec commit e2e9970

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

docs/components/clerk-provider.mdx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ The `<ClerkProvider>` component must be added to your React entrypoint.
1515
<Tab>
1616
The `<ClerkProvider>` component needs to access headers to authenticate correctly. This means anything wrapped by the provider will be opted into dynamic rendering at request time. If you have static-optimized or ISR pages that you would prefer not to be opted into dynamic rendering, make sure they are not wrapped by `<ClerkProvider>`.
1717

18-
This is easiest to accomplish by ensuring that `<ClerkProvider>` is added further down the tree to wrap route groups that explicitly need authentication instead of having the provider wrap your application root as recommended above. For example, if your project includes a set of landing/marketing pages as well as a dashboard that requires sign in, you would create separate (marketing) and (dashboard) route groups. Adding `<ClerkProvider>` to the `(dashboard)/layout.jsx` layout file will ensure that only those routes are opted into dynamic rendering, allowing the marketing routes to be statically optimized.
18+
This is easiest to accomplish by ensuring that `<ClerkProvider>` is added further down the tree to wrap route groups that explicitly need authentication instead of having the provider wrap your application root as recommended above. For example, if your project includes a set of landing/marketing pages as well as a dashboard that requires sign-in, you would create separate (marketing) and (dashboard) route groups. Adding `<ClerkProvider>` to the (dashboard)/layout.jsx layout file will ensure that only those routes are opted into dynamic rendering, allowing the marketing routes to be statically optimized.
19+
20+
21+
<Callout type="info">
22+
The root layout is a server component. If you plan to use the `<ClerkProvider>` outside the root layout, it will need to be a server component as well.
23+
</Callout>
1924

2025
<CodeBlockTabs type="router" options={["App Router", "Pages Router"]}>
2126

@@ -48,7 +53,7 @@ The `<ClerkProvider>` component must be added to your React entrypoint.
4853
function MyApp({ Component, pageProps }: AppProps) {
4954
return (
5055
<ClerkProvider {...pageProps}>
51-
<Component {...pageProps} />
56+
<Component {...pageProps} />
5257
</ClerkProvider>
5358
);
5459
}
@@ -89,23 +94,21 @@ The `<ClerkProvider>` component must be added to your React entrypoint.
8994

9095
| Name | Type | Description |
9196
| ------------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
92-
| `publishableKey` | `string` | The Clerk publishable key for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page. |
93-
| `routerPush?` | `(to: string) => Promise<unknown> \| void` | A function which takes the destination path as an argument and performs a "push" navigation. |
94-
| `routerReplace?` | `(to: string) => Promise<unknown> \| void` | A function which takes the destination path as an argument and performs a "replace" navigation. |
97+
| `publishableKey` | `string` | Clerk publishable key for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page. |
98+
| `frontendApi` | `string` | The frontend API host for your instance. This can be found in your Clerk Dashboard on the **[API Keys](https://dashboard.clerk.com/last-active?path=api-keys)** page under the **Advanced** section. |
99+
| `navigate?` | `(to: string) => Promise<unknown> \| void` | A function which takes the destination path as an argument and performs a "push" navigation. |
95100
| `clerkJSUrl?` | `string` | Define the URL that `@clerk/clerk-react` should hot-load `@clerk/clerk-js` from. |
96101
| `clerkJSVariant?` | `string` | If your web application only uses Control components, you can set this value to `headless` and load a minimal ClerkJS bundle for optimal page performance. |
97102
| `clerkJSVersion?` | `string` | Define the npm version for `@clerk/clerk-js`. |
98103
| `supportEmail?` | `string` | Optional support email for display in authentication screens. Will only affect [Clerk Components][components-ref] and not [Account Portal][ap-ref] pages. |
99104
| `appearance?` | <code>[Appearance](/docs/components/customization/overview) \| undefined</code> | Optional object to style your components. Will only affect [Clerk Components][components-ref] and not [Account Portal][ap-ref] pages. |
100105
| `localization` | <code>[Localization](/docs/components/customization/localization) \| undefined</code> | Optional object to localize your components. Will only affect [Clerk Components][components-ref] and not [Account Portal][ap-ref] pages. |
101106
| `allowedRedirectOrigins?` | `Array<string \| RegExp>` | Optional array of domains used to validate against the query param of an auth redirect. If no match is made, the redirect is considered unsafe and the default redirect will be used with a warning passed to the console. |
102-
| `afterSignInUrl?` | `string` | The default URL to use after the user signs in. Defaults to `/`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
103-
| `afterSignUpUrl?` | `string` | The default URL to use after the user signs up. Defaults to `/`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
104-
107+
| `afterSignInUrl?` | `string` | The default URL to use after the user signs in. |
108+
| `afterSignUpUrl?` | `string` | The default URL to use after the user signs up. |
105109
| `isSatellite?` | `boolean \| ((url: URL) => boolean)` | This option defines that the application is a satellite application. |
106110
| `domain?` | `string \| ((url: URL) => boolean)` | This option sets the domain of the satellite application. If your application is a satellite application, this option is required. |
107-
| `signInUrl` | `string` | This URL will be used for any redirects that might happen and needs to point to your primary application. This option is optional for production instances and required for development instances. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
108-
111+
| `signInUrl` | `string` | This url will be used for any redirects that might happen and needs to point to your primary application. This option is optional for production instances and required for development instances. |
109112
| `telemetry?` | `false \| { disabled?: boolean; debug?: boolean } \| undefined` | Controls whether or not Clerk will collect [telemetry data](/docs/telemetry). |
110113

111114

docs/references/javascript/clerk/clerk.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,23 +122,22 @@ All props below are optional.
122122
| --- | --- | --- |
123123
| `appearance` | <code>[Appearance](/docs/components/customization/overview) \| undefined</code> | Optional object to style your components. Will only affect [Clerk Components][components-ref] and not [Account Portal][ap-ref] pages. |
124124
| `localization` | <code>[Localization](/docs/components/customization/localization) \| undefined</code> | Optional object to localize your components. Will only affect [Clerk Components][components-ref] and not [Account Portal][ap-ref] pages. |
125-
| `routerPush?` | `(to: string) => Promise<unknown> \| void` | A function which takes the destination path as an argument and performs a "push" navigation. |
126-
| `routerReplace?` | `(to: string) => Promise<unknown> \| void` | A function which takes the destination path as an argument and performs a "replace" navigation. |
125+
| `navigate` | `((to: string) => Promise<unknown> \| unknown) \| undefined` | A function which takes the destination path as an argument and performs a "push" navigation. |
127126
| `polling` | `boolean \| undefined` | Dictates if we should poll against Clerk's backend every 5 minutes. Defaults to `true` |
128127
| `selectInitialSession` | <code>((client: [Client][client-ref]) => Session \| null) \| undefined</code> | An optional function which allows you to control which active session is the initial session to base a user's state off of. Defaults to the first session in the client's sessions array. |
129128
| `standardBrowser` | `boolean \| undefined` | Controls if ClerkJS will load with the standard browser set up using Clerk cookies. Defaults to `true` |
130129
| `supportEmail` | `string \| undefined` | Optional support email for display in authentication screens |
131130
| `touchSession` | `boolean \| undefined` | Indicates whether the session should be "touched" when user interactions occur, used to record these interactions. Defaults to `true` |
132-
| `signInUrl` | `string \| undefined` | The default URL to use to direct to when the user signs in. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
133-
| `signUpUrl` | `string \| undefined` | The default URL to use to direct to when the user signs up. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
134-
| `afterSignInUrl` | `string \| undefined` | The default URL to use after the user signs in. Defaults to `/`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
135-
| `afterSignUpUrl` | `string \| undefined` | The default URL to use after the user signs up. Defaults to `/`. It's recommended to use [the environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects) instead. |
136-
131+
| `signInUrl` | `string \| undefined` | The default URL to use to direct to when the user signs in. |
132+
| `signUpUrl` | `string \| undefined` | The default URL to use to direct to when the user signs up. |
133+
| `afterSignInUrl` | `string \| undefined` | The default URL to use after the user signs in. |
134+
| `afterSignUpUrl` | `string \| undefined` | The default URL to use after the user signs up. |
137135
| `allowedRedirectOrigins` | `Array<string \| RegExp> \| undefined` | Optional array of domains used to validate against the query param of an auth redirect.<br />If no match is made, the redirect is considered unsafe and the default redirect will be used with a warning passed to the console. |
138136
| `isInterstitial` | `boolean \| undefined` | Indicates that Clerk.js will be loaded from interstitial. Defaults to `false` |
139137
| `isSatellite` | `boolean \| ((url: URL) => boolean) \| undefined` | Clerk Flag for satellite apps. Experimental. |
140138
| `telemetry?` | `false \| { disabled?: boolean; debug?: boolean } \| undefined` | Controls whether or not Clerk will collect [telemetry data](/docs/telemetry). |
141139

140+
142141
### `signOut()`
143142

144143
- In a [multi-session application](/docs/custom-flows/multi-session-applications): Signs out the active user from all sessions
@@ -220,6 +219,7 @@ In addition to the methods listed above, the `Clerk` class also has the followin
220219

221220
- [`getOrganization()`](/docs/references/javascript/clerk/organization-methods#get-organization)
222221
- [`createOrganization()`](/docs/references/javascript/clerk/organization-methods#create-organization)
222+
- [`getOrganizationMemberships()` (deprecated)](/docs/references/javascript/clerk/organization-methods#get-organization-memberships)
223223

224224
### Redirect
225225

@@ -230,6 +230,7 @@ In addition to the methods listed above, the `Clerk` class also has the followin
230230
- [`redirectToUserProfile()`](/docs/references/javascript/clerk/redirect-methods#redirect-to-user-profile)
231231
- [`redirectToCreateOrganization()`](/docs/references/javascript/clerk/redirect-methods#redirect-to-create-organization)
232232
- [`redirectToOrganizationProfile()`](/docs/references/javascript/clerk/redirect-methods#redirect-to-organization-profile)
233+
- [`redirectToHome()` (deprecated)](/docs/references/javascript/clerk/redirect-methods#redirect-to-home)
233234

234235
### Build URLs
235236

@@ -243,12 +244,13 @@ In addition to the methods listed above, the `Clerk` class also has the followin
243244

244245
### Handle navigation
245246

246-
- [`handleEmailLinkVerification()`](/docs/references/javascript/clerk/handle-navigation#handle-email-link-verification)
247+
- [`handleMagicLinkVerification()`](/docs/references/javascript/clerk/handle-navigation#handle-magic-link-verification)
247248
- [`handleRedirectCallback()`](/docs/references/javascript/clerk/handle-navigation#handle-redirect-callback)
248249
- [`handleUnauthenticated()`](/docs/references/javascript/clerk/handle-navigation#handle-unauthenticated)
249250

250251
### Session
251252

253+
- [`setSession()` (deprecated)](/docs/references/javascript/clerk/session-methods#set-session)
252254
- [`setActive()`](/docs/references/javascript/clerk/session-methods#set-active)
253255

254256
[client-ref]: /docs/references/javascript/client

0 commit comments

Comments
 (0)