diff --git a/docs/advanced-usage/using-proxies.mdx b/docs/advanced-usage/using-proxies.mdx index dff1261dc1..0cd2de5de0 100644 --- a/docs/advanced-usage/using-proxies.mdx +++ b/docs/advanced-usage/using-proxies.mdx @@ -285,7 +285,6 @@ When using a proxy, all requests to the Frontend API will be made through your d To configure your proxy setup using properties in your JavaScript application, pass the `proxyUrl` option to the [`load()`](/docs/references/javascript/clerk/clerk#load) method. - "]}> ```js {{ filename: 'main.js' }} import { Clerk } from '@clerk/clerk-js' @@ -296,27 +295,6 @@ When using a proxy, all requests to the Frontend API will be made through your d proxyUrl: 'https://app.dev/__clerk', }) ``` - - ```html {{ filename: 'index.html' }} - - - - - ``` - diff --git a/docs/components/authentication/google-one-tap.mdx b/docs/components/authentication/google-one-tap.mdx index 0f7bdc2763..1bee695f06 100644 --- a/docs/components/authentication/google-one-tap.mdx +++ b/docs/components/authentication/google-one-tap.mdx @@ -112,9 +112,8 @@ function openGoogleOneTap(params: GoogleOneTapProps): void #### `openGoogleOneTap()` usage -']}> ```js {{ filename: 'index.js', mark: [[7, 12]] }} - import { Clerk } from '@clerk/clerk-js' +import { Clerk } from '@clerk/clerk-js' // Initialize Clerk with your Clerk publishable key const clerk = new Clerk('{{pub_key}}') @@ -127,32 +126,7 @@ function openGoogleOneTap(params: GoogleOneTapProps): void } clerk.openGoogleOneTap(params) ``` - - ```html {{ filename: 'index.html', mark: [[14, 19]] }} - - - - - ``` - - + ### `closeGoogleOneTap()` Closes the `` component. @@ -163,9 +137,8 @@ function closeGoogleOneTap(): void #### `closeGoogleOneTap()` usage -']}> ```js {{ filename: 'index.js', mark: [16] }} - import { Clerk } from '@clerk/clerk-js' + import { Clerk } from '@clerk/clerk-js' // Initialize Clerk with your Clerk publishable key const clerk = new Clerk('{{pub_key}}') @@ -182,39 +155,7 @@ function closeGoogleOneTap(): void clerk.closeGoogleOneTap() ``` - - ```html {{ filename: 'index.html', mark: [26] }} - -
- - - - - - ``` -
- + ### `authenticateWithGoogleOneTap()` Authenticates the user with a token generated from Google identity services. Also sets the user's current session to active. @@ -236,7 +177,6 @@ function authenticateWithGoogleOneTap( #### `authenticateWithGoogleOneTap()` usage -']}> ```js {{ filename: 'index.js', mark: [[7, 15]] }} import { Clerk } from '@clerk/clerk-js' @@ -255,34 +195,6 @@ function authenticateWithGoogleOneTap( await clerk.handleGoogleOneTapCallback(signInOrUp, customUrls) ``` - ```html {{ filename: 'index.html', mark: [[14, 22]] }} - - - - - ``` - - ### `handleGoogleOneTapCallback()` Completes a Google One Tap redirection flow started by [`authenticateWithGoogleOneTap()`](#authenticate-with-google-one-tap). Also calls [`Clerk.setActive()`](/docs/references/javascript/clerk/session-methods#set-active) and performs a custom navigation if given a custom navigation function. diff --git a/docs/components/authentication/sign-in.mdx b/docs/components/authentication/sign-in.mdx index b81eef4f27..7092cc68b7 100644 --- a/docs/components/authentication/sign-in.mdx +++ b/docs/components/authentication/sign-in.mdx @@ -182,7 +182,6 @@ function mountSignIn(node: HTMLDivElement, props?: SignInProps): void #### `mountSignIn()` usage -']}> ```js {{ filename: 'index.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -199,32 +198,6 @@ function mountSignIn(node: HTMLDivElement, props?: SignInProps): void clerk.mountSignIn(signInDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ### `unmountSignIn()` Unmount and run cleanup on an existing `` component instance. @@ -244,7 +217,6 @@ function unmountSignIn(node: HTMLDivElement): void #### `unmountSignIn()` usage -']}> ```js {{ filename: 'index.js', mark: [17] }} import { Clerk } from '@clerk/clerk-js' @@ -265,36 +237,6 @@ function unmountSignIn(node: HTMLDivElement): void clerk.unmountSignIn(signInDiv) ``` - ```html {{ filename: 'index.html', mark: [24] }} - -
- - - - - - ``` -
- ### `openSignIn()` Opens the `` component as an overlay at the root of your HTML `body` element. @@ -314,7 +256,6 @@ function openSignIn(props?: SignInProps): void #### `openSignIn()` usage -']}> ```js {{ filename: 'index.js', mark: [7] }} import { Clerk } from '@clerk/clerk-js' @@ -325,27 +266,6 @@ function openSignIn(props?: SignInProps): void clerk.openSignIn() ``` - ```html {{ filename: 'index.html', mark: [15] }} - - - - - ``` - - ### `closeSignIn()` Closes the sign in overlay. @@ -356,7 +276,6 @@ function closeSignIn(): void #### `closeSignIn()` usage -']}> ```js {{ filename: 'index.js', mark: [11] }} import { Clerk } from '@clerk/clerk-js' @@ -371,31 +290,6 @@ function closeSignIn(): void clerk.closeSignIn() ``` - ```html {{ filename: 'index.html', mark: [19] }} - - - - - ``` - - ## Customization To learn about how to customize Clerk components, see the [customization documentation](/docs/customization/overview). diff --git a/docs/components/authentication/sign-up.mdx b/docs/components/authentication/sign-up.mdx index f06ac49296..9d54ddaaf8 100644 --- a/docs/components/authentication/sign-up.mdx +++ b/docs/components/authentication/sign-up.mdx @@ -175,7 +175,6 @@ function mountSignUp(node: HTMLDivElement, props?: SignUpProps): void #### `mountSignUp()` usage -']}> ```typescript {{ filename: 'index.ts', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -192,32 +191,6 @@ function mountSignUp(node: HTMLDivElement, props?: SignUpProps): void clerk.mountSignUp(signUpDiv) ``` - ```html {{ filename: 'index.js', mark: [20] }} - -
- - - - - - ``` -
- ### `unmountSignUp()` Unmount and run cleanup on an existing `` component instance. @@ -237,7 +210,6 @@ function unmountSignUp(node: HTMLDivElement): void #### `unmountSignUp()` usage -']}> ```typescript {{ filename: 'index.ts', mark: [17] }} import { Clerk } from '@clerk/clerk-js' @@ -258,36 +230,6 @@ function unmountSignUp(node: HTMLDivElement): void clerk.unmountSignUp(signUpDiv) ``` - ```html {{ filename: 'index.js', mark: [24] }} - -
- - - - - - ``` -
- ### `openSignUp()` Opens the `` component as an overlay at the root of your HTML `body` element. @@ -307,7 +249,6 @@ function openSignUp(props?: SignUpProps): void #### `openSignUp()` usage -']}> ```js {{ filename: 'index.ts', mark: [7] }} import { Clerk } from '@clerk/clerk-js' @@ -318,27 +259,6 @@ function openSignUp(props?: SignUpProps): void clerk.openSignUp() ``` - ```html {{ filename: 'index.html', mark: [15] }} - - - - - ``` - - ### `closeSignUp()` Closes the sign up overlay. @@ -349,7 +269,6 @@ function closeSignUp(): void #### `closeSignUp()` usage -']}> ```js {{ filename: 'index.ts', mark: [11] }} import { Clerk } from '@clerk/clerk-js' @@ -364,31 +283,6 @@ function closeSignUp(): void clerk.closeSignUp() ``` - ```html {{ filename: 'index.html', mark: [19] }} - - - - - ``` - - ## Customization To learn about how to customize Clerk components, see the [customization documentation](/docs/customization/overview). diff --git a/docs/components/organization/create-organization.mdx b/docs/components/organization/create-organization.mdx index 59d140f994..0dda421131 100644 --- a/docs/components/organization/create-organization.mdx +++ b/docs/components/organization/create-organization.mdx @@ -146,7 +146,6 @@ function mountCreateOrganization(node: HTMLDivElement, props?: CreateOrganizatio #### `mountCreateOrganization()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -163,32 +162,6 @@ function mountCreateOrganization(node: HTMLDivElement, props?: CreateOrganizatio clerk.mountCreateOrganization(createOrgDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ### unmountCreateOrganization() Unmount and run cleanup on an existing `` component instance. @@ -208,7 +181,6 @@ function unmountCreateOrganization(node: HTMLDivElement): void #### `unmountCreateOrganization()` usage -']}> ```js {{ filename: 'main.js', mark: [17] }} import { Clerk } from '@clerk/clerk-js' @@ -229,36 +201,6 @@ function unmountCreateOrganization(node: HTMLDivElement): void clerk.unmountCreateOrganization(createOrgDiv) ``` - ```html {{ filename: 'index.html', mark: [24] }} - -
- - - - - - ``` -
- ### `openCreateOrganization()` Opens the `` component as an overlay at the root of your HTML `body` element. @@ -278,7 +220,6 @@ function openCreateOrganization(props?: CreateOrganizationProps): void #### `openCreateOrganization()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -295,32 +236,6 @@ function openCreateOrganization(props?: CreateOrganizationProps): void clerk.openCreateOrganization(createOrgDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ### `closeCreateOrganization()` Closes the organization profile overlay. @@ -331,7 +246,6 @@ function closeCreateOrganization(): void #### `closeCreateOrganization()` usage -']}> ```js {{ filename: 'main.js', mark: [17] }} import { Clerk } from '@clerk/clerk-js' @@ -352,36 +266,6 @@ function closeCreateOrganization(): void clerk.closeCreateOrganization(createOrgDiv) ``` - ```html {{ filename: 'index.html', mark: [24] }} - -
- - - - - - ``` -
- ## Customization To learn about how to customize Clerk components, see the [customization documentation](/docs/customization/overview). diff --git a/docs/components/organization/organization-list.mdx b/docs/components/organization/organization-list.mdx index 1b14765ec9..b91df3c6e3 100644 --- a/docs/components/organization/organization-list.mdx +++ b/docs/components/organization/organization-list.mdx @@ -177,7 +177,6 @@ function mountOrganizationList(node: HTMLDivElement, props?: OrganizationListPro ### `mountOrganizationList()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -194,32 +193,6 @@ function mountOrganizationList(node: HTMLDivElement, props?: OrganizationListPro clerk.mountOrganizationList(orgListDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ## `unmountOrganizationList()` Unmount and run cleanup on an existing `` component instance. @@ -239,7 +212,6 @@ function unmountOrganizationList(node: HTMLDivElement): void ### `unmountOrganizationList()` usage -']}> ```js {{ filename: 'main.js', mark: [17] }} import { Clerk } from '@clerk/clerk-js' @@ -260,36 +232,6 @@ function unmountOrganizationList(node: HTMLDivElement): void clerk.unmountOrganizationList(orgListDiv) ``` - ```html {{ filename: 'index.html', mark: [24] }} - -
- - - - - - ``` -
- ## Force organizations If you would like to prohibit people from using their personal accounts and force them to be part of an organization, the `hidePersonal` property forces your user to join or create an organization in order to continue. For more information on how to hide Personal Accounts and force organizations, see the [dedicated guide](/docs/guides/force-organizations). diff --git a/docs/components/organization/organization-profile.mdx b/docs/components/organization/organization-profile.mdx index 69e6e45ff3..9651fe00a4 100644 --- a/docs/components/organization/organization-profile.mdx +++ b/docs/components/organization/organization-profile.mdx @@ -143,7 +143,6 @@ function mountOrganizationProfile(node: HTMLDivElement, props?: OrganizationProf #### `mountOrganizationProfile()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -160,32 +159,6 @@ function mountOrganizationProfile(node: HTMLDivElement, props?: OrganizationProf clerk.mountOrganizationProfile(orgProfileDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ### unmountOrganizationProfile() Unmount and run cleanup on an existing `` component instance. @@ -205,7 +178,6 @@ function unmountOrganizationProfile(node: HTMLDivElement): void #### `unmountOrganizationProfile()` usage -']}> ```js {{ filename: 'main.js', mark: [17] }} import { Clerk } from '@clerk/clerk-js' @@ -225,37 +197,6 @@ function unmountOrganizationProfile(node: HTMLDivElement): void clerk.unmountOrganizationProfile(orgProfileDiv) ``` - - ```html {{ filename: 'index.html', mark: [24] }} - -
- - - - - - ``` -
- ### `openOrganizationProfile()` Opens the `` component as an overlay at the root of your HTML `body` element. @@ -275,7 +216,6 @@ function openOrganizationProfile(props?: OrganizationProfileProps): void #### `openOrganizationProfile()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -292,32 +232,6 @@ function openOrganizationProfile(props?: OrganizationProfileProps): void clerk.openOrganizationProfile(orgProfileDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ### `closeOrganizationProfile()` Closes the organization profile overlay. @@ -328,7 +242,6 @@ function closeOrganizationProfile(): void #### `closeOrganizationProfile()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -345,32 +258,6 @@ function closeOrganizationProfile(): void clerk.closeOrganizationProfile(orgProfileDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ## Customization To learn about how to customize Clerk components, see the [customization documentation](/docs/customization/overview). diff --git a/docs/components/organization/organization-switcher.mdx b/docs/components/organization/organization-switcher.mdx index 37c69dc2a2..5dc563f837 100644 --- a/docs/components/organization/organization-switcher.mdx +++ b/docs/components/organization/organization-switcher.mdx @@ -204,7 +204,6 @@ function mountOrganizationSwitcher(node: HTMLDivElement, props?: OrganizationSwi ### mountOrganizationSwitcher() usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -221,32 +220,6 @@ function mountOrganizationSwitcher(node: HTMLDivElement, props?: OrganizationSwi clerk.mountOrganizationSwitcher(orgSwitcherDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ## unmountOrganizationSwitcher() Unmount and run cleanup on an existing `` component instance. @@ -266,7 +239,6 @@ function unmountOrganizationSwitcher(node: HTMLDivElement): void ### unmountOrganizationSwitcher() usage -']}> ```js {{ filename: 'main.js', mark: [17] }} import { Clerk } from '@clerk/clerk-js' @@ -287,36 +259,6 @@ function unmountOrganizationSwitcher(node: HTMLDivElement): void clerk.unmountOrganizationSwitcher(orgSwitcherDiv) ``` - ```html {{ filename: 'index.html', mark: [24] }} - -
- - - - - - ``` -
- ## Customization To learn about how to customize Clerk components, see the [customization documentation](/docs/customization/overview). diff --git a/docs/components/user/user-button.mdx b/docs/components/user/user-button.mdx index b9730e6479..aa52956531 100644 --- a/docs/components/user/user-button.mdx +++ b/docs/components/user/user-button.mdx @@ -284,7 +284,6 @@ function mountUserButton(node: HTMLDivElement, props?: UserButtonProps): void #### `mountUserButton()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -301,32 +300,6 @@ function mountUserButton(node: HTMLDivElement, props?: UserButtonProps): void clerk.mountUserButton(userbuttonDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ### `unmountUserButton()` Unmount and run cleanup on an existing `` component instance. @@ -346,7 +319,6 @@ function unmountUserButton(node: HTMLDivElement): void #### `unmountUserButton()` usage -']}> ```js {{ filename: 'main.js', mark: [17] }} import { Clerk } from '@clerk/clerk-js' @@ -367,36 +339,6 @@ function unmountUserButton(node: HTMLDivElement): void clerk.unmountUserButton(userButtonDiv) ``` - ```html {{ filename: 'index.html', mark: [24] }} - -
- - - - - - ``` -
- ## Customization To learn about how to customize Clerk components, see the [customization documentation](/docs/customization/overview). diff --git a/docs/components/user/user-profile.mdx b/docs/components/user/user-profile.mdx index 2465d2c3e0..ca02062d47 100644 --- a/docs/components/user/user-profile.mdx +++ b/docs/components/user/user-profile.mdx @@ -139,7 +139,6 @@ function mountUserProfile(node: HTMLDivElement, props?: UserProfileProps): void #### `mountUserProfile()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -156,31 +155,6 @@ function mountUserProfile(node: HTMLDivElement, props?: UserProfileProps): void clerk.mountUserProfile(userProfileDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
### `unmountUserProfile()` @@ -201,7 +175,6 @@ function unmountUserProfile(node: HTMLDivElement): void #### `unmountUserProfile()` usage -']}> ```js {{ filename: 'main.js', mark: [17] }} import { Clerk } from '@clerk/clerk-js' @@ -222,36 +195,6 @@ function unmountUserProfile(node: HTMLDivElement): void clerk.unmountUserProfile(userProfileDiv) ``` - ```html {{ filename: 'index.html', mark: [24] }} - -
- - - - - - ``` -
- ### `openUserProfile()` Opens the `` component as an overlay at the root of your HTML `body` element. @@ -271,7 +214,6 @@ function openUserProfile(props?: UserProfileProps): void #### `openUserProfile()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -288,32 +230,6 @@ function openUserProfile(props?: UserProfileProps): void clerk.openUserProfile(userProfileDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ### `closeUserProfile()` Closes the user profile overlay. @@ -324,7 +240,6 @@ function closeUserProfile(): void #### `closeUserProfile()` usage -']}> ```js {{ filename: 'main.js', mark: [13] }} import { Clerk } from '@clerk/clerk-js' @@ -341,32 +256,6 @@ function closeUserProfile(): void clerk.closeUserProfile(userProfileDiv) ``` - ```html {{ filename: 'index.html', mark: [20] }} - -
- - - - - - ``` -
- ## Customization To learn about how to customize Clerk components, see the [customization documentation](/docs/customization/overview). diff --git a/docs/custom-flows/email-password-mfa.mdx b/docs/custom-flows/email-password-mfa.mdx index 4f39e11a68..1324d50c1c 100644 --- a/docs/custom-flows/email-password-mfa.mdx +++ b/docs/custom-flows/email-password-mfa.mdx @@ -172,10 +172,6 @@ This guide will walk you through how to build a custom email/password sign-in fl - "]}> - - Use the following tabs to view the code necessary for each file. - ```html {{ filename: 'index.html', collapsible: true }} @@ -294,131 +290,6 @@ This guide will walk you through how to build a custom email/password sign-in fl - - ```html {{ filename: 'index.html', collapsible: true }} - - - - - - Clerk + JavaScript App - - -
- -
-

Sign in

-
- - - - - -
-
- - - - - - - - - ``` -
-
-
- ### Before you start diff --git a/docs/custom-flows/email-password.mdx b/docs/custom-flows/email-password.mdx index 1961b21aa3..b753ff768d 100644 --- a/docs/custom-flows/email-password.mdx +++ b/docs/custom-flows/email-password.mdx @@ -157,11 +157,6 @@ This guide will walk you through how to build a custom email/password sign-up an ``` - - "]}> - - Use the following tabs to view the code necessary for each file. - ```html {{ filename: 'index.html', collapsible: true }} @@ -259,111 +254,6 @@ This guide will walk you through how to build a custom email/password sign-up an } ``` - - - - ```html {{ filename: 'index.html', collapsible: true }} - - - - - - Clerk + JavaScript App - - -
- -
-

Sign up

-
- - - - - -
-
- - - - - - - - - ``` -
-
-
Create a route group with a layout that redirects users if they're already signed in, as shown in the following example: @@ -680,10 +570,6 @@ This guide will walk you through how to build a custom email/password sign-up an - "]}> - - Use the following tabs to view the code necessary for each file. - ```html {{ filename: 'index.html', collapsible: true }} @@ -765,92 +651,6 @@ This guide will walk you through how to build a custom email/password sign-up an - - ```html {{ filename: 'index.html', collapsible: true }} - - - - - - Clerk + JavaScript App - - -
- -
-

Sign in

-
- - - - - -
-
- - - - - - - ``` -
-
-
- Create a route group with a layout that redirects users if they're already signed in, as shown in the following example: diff --git a/docs/custom-flows/email-sms-otp.mdx b/docs/custom-flows/email-sms-otp.mdx index 6d0f453e87..4d593e673c 100644 --- a/docs/custom-flows/email-sms-otp.mdx +++ b/docs/custom-flows/email-sms-otp.mdx @@ -135,10 +135,6 @@ This guide will walk you through how to build a custom SMS OTP sign-up and sign- ``` - - "]}> - - Use the following tabs to view the code necessary for each file. ```html {{ filename: 'index.html', collapsible: true }} @@ -234,108 +230,9 @@ This guide will walk you through how to build a custom SMS OTP sign-up and sign- } ``` - - - - ```html {{ filename: 'index.html', collapsible: true }} - - - - - - Clerk + JavaScript App - - -
- -
-

Sign up

-
- - - -
-
- - + - - - - - - ``` -
-
-
+ ```swift {{ filename: 'SMSOTPSignUpView.swift', collapsible: true }} @@ -541,10 +438,6 @@ This guide will walk you through how to build a custom SMS OTP sign-up and sign- ``` - - "]}> - - Use the following tabs to view the code necessary for each file. ```html {{ filename: 'index.html', collapsible: true }} @@ -658,126 +551,7 @@ This guide will walk you through how to build a custom SMS OTP sign-up and sign- } ``` - - - - ```html {{ filename: 'index.html', collapsible: true }} - - - - - - Clerk + JavaScript App - - -
- -
-

Sign in

-
- - - -
-
- - - - - - - - - ``` -
-
-
+ ```swift {{ filename: 'SMSOTPSignInView.swift', collapsible: true }} diff --git a/docs/custom-flows/error-handling.mdx b/docs/custom-flows/error-handling.mdx index 81b08db8e2..3842f0e736 100644 --- a/docs/custom-flows/error-handling.mdx +++ b/docs/custom-flows/error-handling.mdx @@ -111,11 +111,6 @@ The following example uses the [email & password sign-in custom flow](/docs/cust ``` - - "]}> - - Use the following tabs to view the code necessary for each file. - ```html {{ filename: 'index.html' }} @@ -219,117 +214,7 @@ The following example uses the [email & password sign-in custom flow](/docs/cust } ``` - - - - ```html {{ filename: 'index.html' }} - - - - - - Clerk + JavaScript App - - -
- -
-

Sign up

-
- - - - - -
-
- - - -

- - - - - - - ``` -
-
-
+ ## Special error cases diff --git a/docs/custom-flows/invitations.mdx b/docs/custom-flows/invitations.mdx index e911df6ad2..4ac306e71c 100644 --- a/docs/custom-flows/invitations.mdx +++ b/docs/custom-flows/invitations.mdx @@ -132,7 +132,7 @@ To create a sign-up flow using the invitation token, you need to extract the tok - "]}> + ```html {{ filename: 'index.html' }} @@ -221,97 +221,6 @@ To create a sign-up flow using the invitation token, you need to extract the tok ``` - - ```html {{ filename: 'index.html' }} - - - - - - Clerk + JavaScript App - - -
- -
-

Sign up

-
- - - - - - - -
-
- - - - - - - ``` -
diff --git a/docs/custom-flows/sign-out.mdx b/docs/custom-flows/sign-out.mdx index f814d16a1e..cd44ad2f8b 100644 --- a/docs/custom-flows/sign-out.mdx +++ b/docs/custom-flows/sign-out.mdx @@ -38,10 +38,6 @@ The `signOut()` function signs a user out of all sessions in a [multi-session ap ``` - - "]}> - - Use the following tabs to view the code necessary for each file. ```html {{ filename: 'index.html', collapsible: true }} @@ -79,52 +75,7 @@ The `signOut()` function signs a user out of all sessions in a [multi-session ap } ``` - - - - ```html {{ filename: 'index.html', collapsible: true }} - - - - - - - Clerk + JavaScript App - - - -
- - - - - - - - - - ``` -
-
-
+ ```swift {{ filename: 'SignOutView.swift', collapsible: true }} diff --git a/docs/customization/organization-profile.mdx b/docs/customization/organization-profile.mdx index 9e648c1698..2914010ddc 100644 --- a/docs/customization/organization-profile.mdx +++ b/docs/customization/organization-profile.mdx @@ -164,7 +164,6 @@ The following example demonstrates two ways that you can render content in the ` To add custom pages to the `` component using the [JavaScript SDK](/docs/references/javascript/overview), you can pass the `customPages` property to the `mountOrganizationProfile()` or `openOrganizationProfile()` method, as shown in the following example: -']}> ```js {{ filename: 'main.js' }} import { Clerk } from '@clerk/clerk-js' @@ -213,64 +212,6 @@ To add custom pages to the `` component using the [JavaSc }) ``` - ```html {{ filename: 'index.html' }} - -
- - - - - - ``` -
- ## Add a custom link to `` You can add external links to the `` navigation sidebar using the `` component or the `` component, depending on your use case. diff --git a/docs/customization/user-profile.mdx b/docs/customization/user-profile.mdx index cab1ceafcb..9933ce5625 100644 --- a/docs/customization/user-profile.mdx +++ b/docs/customization/user-profile.mdx @@ -210,7 +210,6 @@ The following example demonstrates two ways that you can render content in the ` To add custom pages to the `` component using the [JavaScript SDK](/docs/references/javascript/overview), you can pass the `customPages` property to the `mountUserProfile()` or `openUserProfile()` method, as shown in the following example: -']}> ```js {{ filename: 'main.js' }} import { Clerk } from '@clerk/clerk-js' @@ -259,63 +258,6 @@ To add custom pages to the `` component using the [JavaScript SDK }) ``` - ```html {{ filename: 'index.html' }} - -
- - - - - - ``` -
## Add a custom link to \ diff --git a/docs/quickstarts/javascript.mdx b/docs/quickstarts/javascript.mdx index 23eb217cbb..2c49d8bf12 100644 --- a/docs/quickstarts/javascript.mdx +++ b/docs/quickstarts/javascript.mdx @@ -24,22 +24,11 @@ description: Add authentication and user management to your JavaScript app with - Use Clerk components to allow users to sign in or out -To add the [JavaScript SDK](/docs/references/javascript/overview) to your JavaScript app, you have two options: +To install Clerk's JavaScript SDK to your JavaScript app, you need to use a bundler like [Vite](https://vitejs.dev/) or [Webpack](https://webpack.js.org/). -1. Install the package using a package manager, like `npm`. -1. Use the ` - ``` - - ### Listen for the `load` event - - Below the ` tag that initializes the SDK, create another ` - ``` - - ### Allow users to sign in or out - - Clerk's [prebuilt components](/docs/components/overview) are the easiest way to add authentication and user management to your app. They come styled out-of-the-box and are customizable to fit your app's design. - - To get started, you will use: - - - [``](/docs/components/authentication/sign-in): renders a user interface for signing in. - - [``](/docs/components/user/user-button): Shows the signed-in user's avatar. Selecting it opens a dropdown menu with account management options. - - ```html {{ filename: 'index.html' }} -
- - - - - - ``` - -
- ### More resources diff --git a/docs/references/javascript/clerk/organization-methods.mdx b/docs/references/javascript/clerk/organization-methods.mdx index b82b5eb80d..c511b0ac57 100644 --- a/docs/references/javascript/clerk/organization-methods.mdx +++ b/docs/references/javascript/clerk/organization-methods.mdx @@ -164,10 +164,7 @@ function createOrganization({ name, slug }: CreateOrganizationParams): Promise ### Example - -']}> - - + ```js {{ filename: 'main.js', mark: [[10, 13]] }} import { Clerk } from '@clerk/clerk-js' @@ -211,41 +208,4 @@ function createOrganization({ name, slug }: CreateOrganizationParams): Promise ``` - - - - ```html {{ filename: 'index.html', mark: [[21, 23]] }} -
-
- - - - - - ``` -
-
+ \ No newline at end of file diff --git a/docs/references/javascript/organization-invitation.mdx b/docs/references/javascript/organization-invitation.mdx index 54d33bc17a..c111f20bd7 100644 --- a/docs/references/javascript/organization-invitation.mdx +++ b/docs/references/javascript/organization-invitation.mdx @@ -86,7 +86,6 @@ It assumes: - you have followed the [quickstart](/docs/quickstarts/javascript) in order to add Clerk to your JavaScript application - you have [enabled the Organizations feature in your Clerk Dashboard](/docs/organizations/overview#enable-organizations-in-your-application) -']}> ```js {{ filename: 'main.js', mark: [21, 22] }} import { Clerk } from '@clerk/clerk-js' @@ -135,65 +134,3 @@ It assumes: clerk.mountSignIn(signInDiv) } ``` - - ```html {{ filename: 'index.html', mark: [31, 32] }} -
- - - - - - ``` -
diff --git a/docs/references/javascript/organization/domains.mdx b/docs/references/javascript/organization/domains.mdx index 4273c78320..591b9cc0a6 100644 --- a/docs/references/javascript/organization/domains.mdx +++ b/docs/references/javascript/organization/domains.mdx @@ -35,8 +35,6 @@ function createDomain(domainName: string): Promise | `Promise` | This method returns a `Promise` that resolves to the [`OrganizationDomain`][org-domain-ref] for the corresponding ID. | ### Example - -']}> ```js {{ filename: 'main.js', mark: [10, 11] }} import { Clerk } from '@clerk/clerk-js' @@ -75,55 +73,6 @@ function createDomain(domainName: string): Promise } ``` - ```html {{ filename: 'index.html', mark: [20, 21] }} -
- - - - - - ``` -
- ## `getDomains()` Retrieves the list of domains for the currently active organization. @@ -163,7 +112,6 @@ function getDomains(params?: GetDomainsParams): Promise']}> ```js {{ filename: 'main.js', mark: [10, 11] }} import { Clerk } from '@clerk/clerk-js' @@ -202,55 +150,6 @@ function getDomains(params?: GetDomainsParams): Promise - - - - - - ``` - - ## `getDomain()` Retrieves a domain for an organization based on the given domain ID. @@ -276,7 +175,6 @@ function getDomain(params: GetDomainParams): Promise ### Example -']}> ```js {{ filename: 'main.js', mark: [12, 13] }} import { Clerk } from '@clerk/clerk-js' @@ -317,55 +215,4 @@ function getDomain(params: GetDomainParams): Promise } ``` - ```html {{ filename: 'index.html', mark: [22, 23] }} -
- - - - - - ``` -
- [org-domain-ref]: /docs/references/javascript/organization-domain diff --git a/docs/references/javascript/organization/invitations.mdx b/docs/references/javascript/organization/invitations.mdx index 32b83247e7..7f567b6b85 100644 --- a/docs/references/javascript/organization/invitations.mdx +++ b/docs/references/javascript/organization/invitations.mdx @@ -51,7 +51,6 @@ function getInvitations( ### Example -']}> ```js {{ filename: 'main.js', mark: [10, 11] }} import { Clerk } from '@clerk/clerk-js' @@ -90,56 +89,6 @@ function getInvitations( } ``` - ```html {{ filename: 'index.html', mark: [20, 21] }} -
- - - - - - ``` -
## `inviteMember()` @@ -173,7 +122,6 @@ function inviteMember(params: InviteMemberParams): Promise']}> ```js {{ filename: 'main.js', mark: [13, 14] }} import { Clerk } from '@clerk/clerk-js' @@ -215,60 +163,6 @@ function inviteMember(params: InviteMemberParams): Promise - - - - - - ``` - - ## `inviteMembers()` Creates and sends an invitation to the target email addresses for becoming a member with the role passed in the parameters. @@ -301,8 +195,7 @@ function inviteMembers(params: InviteMembersParams): Promise']}> - ```js {{ filename: 'main.js', mark: [13, 14] }} +```js {{ filename: 'main.js', mark: [13, 14] }} import { Clerk } from '@clerk/clerk-js' // Initialize Clerk with your Clerk publishable key @@ -343,58 +236,4 @@ function inviteMembers(params: InviteMembersParams): Promise - - - - - - ``` - - [orginv-ref]: /docs/references/javascript/organization-invitation diff --git a/docs/references/javascript/organization/members.mdx b/docs/references/javascript/organization/members.mdx index 5d2db0cb30..11f0b46450 100644 --- a/docs/references/javascript/organization/members.mdx +++ b/docs/references/javascript/organization/members.mdx @@ -142,11 +142,7 @@ function removeMember(userId: string): Promise The following example demonstrates how to use the organization membership methods to manage the members of an organization. To ease the development process, the response or error message of a method will be displayed on the user interface. -']}> - - Use the following tabs to view the code necessary for each file. - - + ```html {{ filename: 'index.html' }} @@ -355,227 +351,7 @@ The following example demonstrates how to use the organization membership method } ``` - - - - ```html {{ filename: 'index.html', mark: [74, 102, 120, 138] }} - - - - - - - Clerk + JavaScript App - - - -
- - - -

Memberships List

- - - - - - - - - - - -
User IDIdentifierRole
- -
-

Add member

- - -
- -

Response:

-

-
-        
-        
-
-        
-      
-    
-    ```
-  
-
[pag-ref]: /docs/references/javascript/types/clerk-paginated-response diff --git a/docs/references/javascript/organization/membership-request.mdx b/docs/references/javascript/organization/membership-request.mdx index ec94efc8b2..ad3cda8411 100644 --- a/docs/references/javascript/organization/membership-request.mdx +++ b/docs/references/javascript/organization/membership-request.mdx @@ -54,10 +54,6 @@ function getMembershipRequests( The following example demonstrates how to use the `getMembershipRequests()` method to render a table of membership requests for the active organization. To ease the development process, the response or error message of a method will be displayed on the user interface. -']}> - - Use the following tabs to view the code necessary for each file. - ```html {{ filename: 'index.html' }} @@ -222,176 +218,4 @@ The following example demonstrates how to use the `getMembershipRequests()` meth } ``` - - - - ```html {{ filename: 'index.html', mark: [65] }} - - - - - - - Clerk + JavaScript App - - - -
- - - -

Membership Requests

- - - - - - - - - - -
User IDIdentifierStatus
- -

Response:

-

-
-        
-        
-
-        
-      
-    
-    ```
-  
-
diff --git a/docs/references/javascript/organization/organization.mdx b/docs/references/javascript/organization/organization.mdx index 74d27b56d7..aeac120580 100644 --- a/docs/references/javascript/organization/organization.mdx +++ b/docs/references/javascript/organization/organization.mdx @@ -130,7 +130,6 @@ function update(params: UpdateOrganizationParams): Promise #### Example -']}> ```js {{ filename: 'main.js', mark: [10, 11] }} import { Clerk } from '@clerk/clerk-js' @@ -169,55 +168,6 @@ function update(params: UpdateOrganizationParams): Promise } ``` - ```html {{ filename: 'index.html', mark: [19, 20] }} -
- - - - - - ``` -
### `destroy()` @@ -237,7 +187,6 @@ function destroy(): Promise #### Example -']}> ```js {{ filename: 'main.js', mark: [10, 11] }} import { Clerk } from '@clerk/clerk-js' @@ -276,55 +225,6 @@ function destroy(): Promise } ``` - ```html {{ filename: 'index.html', mark: [19, 20] }} -
- - - - - - ``` -
### `setLogo()` @@ -351,11 +251,7 @@ function setLogo(params: SetOrganizationLogoParams): Promise #### Example -']}> - - Use the following tabs to view the code necessary for each file. - - + ```html {{ filename: 'index.html' }} @@ -419,68 +315,7 @@ function setLogo(params: SetOrganizationLogoParams): Promise } ``` - - - - ```html {{ filename: 'index.html', mark: [27, 28] }} -
- - - - - - - - - ``` -
-
### `getRoles()` @@ -613,7 +448,6 @@ An _experimental_ interface that includes information about a user's permission. #### Example -']}> ```js {{ filename: 'main.js', mark: [10, 11] }} import { Clerk } from '@clerk/clerk-js' @@ -652,55 +486,6 @@ An _experimental_ interface that includes information about a user's permission. } ``` - ```html {{ filename: 'index.html', mark: [19, 20] }} -
- - - - - - ``` -
## Additional methods diff --git a/docs/references/javascript/session.mdx b/docs/references/javascript/session.mdx index a07db94a3b..aa9895bf99 100644 --- a/docs/references/javascript/session.mdx +++ b/docs/references/javascript/session.mdx @@ -179,7 +179,6 @@ function getToken(options?: GetTokenOptions): Promise #### Example -']}> ```js {{ filename: 'main.js', mark: [8, 9] }} import { Clerk } from '@clerk/clerk-js' @@ -203,41 +202,6 @@ function getToken(options?: GetTokenOptions): Promise } ``` - ```html {{ filename: 'index.html', mark: [18, 19] }} -
- - - - - - ``` -
```js try { diff --git a/docs/references/javascript/user/create-metadata.mdx b/docs/references/javascript/user/create-metadata.mdx index 4ce35a88b5..ba9cad3dff 100644 --- a/docs/references/javascript/user/create-metadata.mdx +++ b/docs/references/javascript/user/create-metadata.mdx @@ -31,7 +31,6 @@ function createEmailAddress(params: CreateEmailAddressParams): Promise']}> ```js {{ filename: 'main.js' }} import { Clerk } from '@clerk/clerk-js' @@ -57,44 +56,6 @@ The following example adds `test@test.com` as an email address for the user. If } ``` - ```html {{ filename: 'index.html' }} -
- - - - - - ``` - - ## `createPhoneNumber()` Adds a phone number for the user. A new [`PhoneNumber`][phone-ref] will be created and associated with the user. @@ -119,7 +80,6 @@ function createPhoneNumber(params: CreatePhoneNumberParams): Promise']}> ```js {{ filename: 'main.js' }} import { Clerk } from '@clerk/clerk-js' @@ -145,43 +105,6 @@ The following example adds `15551234567` as a phone number for the user. If the } ``` - ```html {{ filename: 'index.html' }} -
- - - - - - ``` - ## `createWeb3Wallet()` @@ -207,7 +130,6 @@ function createWeb3Wallet(params: CreateWeb3WalletParams): Promise The following example adds `0x0123456789ABCDEF0123456789ABCDEF01234567` as a Web3 wallet for the user. If the user is not signed in, the user will be prompted to sign in. -']}> ```js {{ filename: 'main.js' }} import { Clerk } from '@clerk/clerk-js' @@ -233,44 +155,6 @@ The following example adds `0x0123456789ABCDEF0123456789ABCDEF01234567` as a Web } ``` - ```html {{ filename: 'index.html' }} -
- - - - - - ``` -
- ## `createExternalAccount()` Adds an external account for the user. A new [`ExternalAccount`][exacc-ref] will be created and associated with the user. This method is useful if you want to allow an already signed-in user to connect their account with an external provider, such as Facebook, GitHub, etc., so that they can sign in with that provider in the future. @@ -316,11 +200,7 @@ Upon return, inspect within the `user.externalAccounts` the entry that correspon The following example demonstrates how to add a Notion account as an external account for the user. When the user selects the "Add Notion as a social connection" button, the user will be redirected to Notion to connect their account. After connecting their account, they will be redirected to the `/` route of your application, and the status of the connection will be displayed. -']}> - - Use the following tabs to view the code necessary for each file. - - + ```html {{ filename: 'index.html' }} @@ -379,62 +259,7 @@ The following example demonstrates how to add a Notion account as an external ac } ``` - - - - ```html {{ filename: 'index.html' }} -
-

- Notion verification status: - -

- - - - - - - ``` -
-
+ [email-ref]: /docs/references/javascript/email-address diff --git a/docs/references/javascript/user/password-management.mdx b/docs/references/javascript/user/password-management.mdx index adba4e6860..5a3cc460ce 100644 --- a/docs/references/javascript/user/password-management.mdx +++ b/docs/references/javascript/user/password-management.mdx @@ -40,9 +40,6 @@ function updatePassword(params: UpdateUserPasswordParams): Promise ### Example -']}> - - Use the following tabs to view the code necessary for each file. ```html {{ filename: 'index.html' }} @@ -99,61 +96,7 @@ function updatePassword(params: UpdateUserPasswordParams): Promise } ``` - - - ```html {{ filename: 'index.html' }} -
- -

Update password

- - -

- - - - - - - ``` -
-
## `removePassword()` @@ -174,8 +117,6 @@ function removePassword(params: RemoveUserPasswordParams): Promise ### Example -']}> - For the following example, your HTML file should look like this: ```js {{ filename: 'main.js' }} @@ -230,53 +171,4 @@ function removePassword(params: RemoveUserPasswordParams): Promise ``` - - - - ```html {{ filename: 'index.html' }} -
- - -

- - - - - - - ``` -
-
+ diff --git a/docs/references/javascript/user/totp.mdx b/docs/references/javascript/user/totp.mdx index bbbeda7695..60475768cc 100644 --- a/docs/references/javascript/user/totp.mdx +++ b/docs/references/javascript/user/totp.mdx @@ -149,9 +149,6 @@ The following example assumes: - you have followed the [quickstart](/docs/quickstarts/javascript) in order to add Clerk to your JavaScript application - you have [enabled **Authenticator application** and **Backup codes** as multi-factor strategies in your Clerk Dashboard](/docs/authentication/configuration/sign-up-sign-in-options#authentication-strategies) -']}> - - Use the following tabs to view the code necessary for each file. ```html {{ filename: 'index.html' }} @@ -273,120 +270,4 @@ The following example assumes: } ``` - - - - ```html {{ filename: 'index.html' }} -
- - - - - - - - - -

Response:

-

-
-    
-    
-
-    
-    ```
-  
-
+ diff --git a/docs/references/javascript/user/user.mdx b/docs/references/javascript/user/user.mdx index d426a4c9cd..9e6907c9b1 100644 --- a/docs/references/javascript/user/user.mdx +++ b/docs/references/javascript/user/user.mdx @@ -341,7 +341,6 @@ All props below are optional. In the following example, the user's first name is updated to "Test". -']}> ```js {{ filename: 'main.js', mark: [8, 9] }} import { Clerk } from '@clerk/clerk-js' @@ -365,41 +364,6 @@ In the following example, the user's first name is updated to "Test". } ``` - ```html {{ filename: 'index.html', mark: [18, 19] }} -
- - - - - - ``` -
### `delete()` @@ -411,7 +375,6 @@ function delete(): Promise #### Example -']}> ```js {{ filename: 'main.js', mark: [8, 9] }} import { Clerk } from '@clerk/clerk-js' @@ -435,42 +398,6 @@ function delete(): Promise } ``` - ```html {{ filename: 'index.html', mark: [18, 19] }} -
- - - - - - ``` -
- ### `setProfileImage()` Adds the user's profile image or replaces it if one already exists. This method will upload an image and associate it with the user. @@ -513,10 +440,6 @@ function setProfileImage(params: SetProfileImageParams): Promise #### Example -']}> - - Use the following tabs to view the code necessary for each file. - ```html {{ filename: 'index.html' }} @@ -567,51 +490,7 @@ function setProfileImage(params: SetProfileImageParams): Promise } ``` - - - - ```html {{ filename: 'index.html' }} -
- - - - - - - - - ``` -
-
+ ### `reload()` @@ -632,7 +511,6 @@ function reload(p?: ClerkResourceReloadParams): Promise #### Example -']}> ```js {{ filename: 'main.js', mark: [7] }} import { Clerk } from '@clerk/clerk-js' @@ -643,26 +521,6 @@ function reload(p?: ClerkResourceReloadParams): Promise await clerk.user.reload() ``` - ```html {{ filename: 'index.html', mark: [15] }} - - - - - ``` - ### `getSessions()` @@ -680,7 +538,6 @@ function getSessions(): Promise #### Example -']}> ```js {{ filename: 'main.js', mark: [8, 9] }} import { Clerk } from '@clerk/clerk-js' @@ -704,41 +561,6 @@ function getSessions(): Promise } ``` - ```html {{ filename: 'index.html', mark: [18, 19] }} -
- - - - - - ``` -
### `createPasskey()` @@ -817,7 +639,6 @@ function getOrganizationInvitations( #### Example -']}> ```js {{ filename: 'main.js', mark: [8, 9] }} import { Clerk } from '@clerk/clerk-js' @@ -841,42 +662,6 @@ function getOrganizationInvitations( } ``` - ```html {{ filename: 'index.html', mark: [18, 19] }} -
- - - - - - ``` -
- ### `getOrganizationSuggestions()` Retrieves a list of organization suggestions for the user. @@ -918,7 +703,6 @@ function getOrganizationSuggestions( #### Example -']}> ```js {{ filename: 'main.js', mark: [8, 9] }} import { Clerk } from '@clerk/clerk-js' @@ -942,42 +726,6 @@ function getOrganizationSuggestions( } ``` - ```html {{ filename: 'index.html', mark: [18, 19] }} -
- - - - - - ``` -
- ### `getOrganizationMemberships()` Retrieves a list of organization memberships for the user. @@ -1012,7 +760,6 @@ function getOrganizationMemberships( #### Example -']}> ```js {{ filename: 'main.js', mark: [8, 9] }} import { Clerk } from '@clerk/clerk-js' @@ -1036,42 +783,6 @@ function getOrganizationMemberships( } ``` - ```html {{ filename: 'index.html', mark: [18, 19] }} -
- - - - - - ``` -
- ## Additional methods In addition to the methods listed above, the `User` class also has the following methods: diff --git a/docs/users/metadata.mdx b/docs/users/metadata.mdx index 24b8713a4e..4f89f037d4 100644 --- a/docs/users/metadata.mdx +++ b/docs/users/metadata.mdx @@ -564,7 +564,6 @@ Updating this value overrides the previous value; it does not merge. To perform - "]}> ```js {{ filename: 'main.js' }} import { Clerk } from '@clerk/clerk-js' @@ -591,57 +590,6 @@ Updating this value overrides the previous value; it does not merge. To perform clerk.mountSignIn(signInDiv) } ``` - - ```html {{ filename: 'index.html' }} - - - - - - - Clerk Unsafe Update - - -
- - - - - - - - ``` -
diff --git a/docs/users/user-impersonation.mdx b/docs/users/user-impersonation.mdx index 2d0a632a3f..37056f3c27 100644 --- a/docs/users/user-impersonation.mdx +++ b/docs/users/user-impersonation.mdx @@ -103,7 +103,6 @@ To detect impersonated sessions in the frontend, the `actor` object contains the You can use the [`Clerk`](/docs/references/javascript/clerk/clerk) object to get access to the `session` object, which includes the `actor` object. - "]}> ```js {{ filename: 'main.js' }} import { Clerk } from '@clerk/clerk-js' @@ -119,31 +118,6 @@ To detect impersonated sessions in the frontend, the `actor` object contains the console.log(`User ${actor.sub} is signed in as user ${user.id}.`) } ``` - - ```html {{ filename: 'index.html' }} - - - - ``` -