Skip to content

(chore): handle build script warnings #2170

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

Merged
merged 3 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion docs/_partials/clerk-middleware-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The `clerkMiddleware()` function accepts an optional object. The following optio
- `organizationSyncOptions?`
- <code>[OrganizationSyncOptions](#organization-sync-options) | undefined</code>

Used to activate a specific [organization](/docs/organizations/overview) or [personal account](/docs/organizations/organization-workspaces#organization-workspaces-in-the-clerk-dashboard:~:text=Personal%20account) based on URL path parameters. If there's a mismatch between the active organization in the session (e.g., as reported by [`auth()`](/docs/references/nextjs/auth)) and the organization indicated by the URL, the middleware will attempt to activate the organization specified in the URL.
Used to activate a specific [organization](/docs/organizations/overview) or [personal account](/docs/organizations/organization-workspaces) based on URL path parameters. If there's a mismatch between the active organization in the session (e.g., as reported by [`auth()`](/docs/references/nextjs/auth)) and the organization indicated by the URL, the middleware will attempt to activate the organization specified in the URL.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/_partials/custom-flows/email-link-verification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
1. The `createEmailLinkFlow()` method is used to access the `startEmailLinkFlow()` method.
1. The `startEmailLinkFlow()` method is called with the `redirectUrl` parameter set to `/account/add-email/verify`. It sends an email with a verification link to the user. When the user visits the link, they are redirected to the URL that was provided.
1. On the `/account/add-email/verify` page, the [`useClerk()`](/docs/hooks/use-clerk) hook is used to get the `handleEmailLinkVerification()` method.
1. The [`handleEmailLinkVerification()`](/docs/references/javascript/clerk/handle-navigation#handle-email-link-verification) method is called to verify the email address. Error handling is included to handle any errors that occur during the verification process.
1. The [`handleEmailLinkVerification()`](/docs/references/javascript/clerk#handle-email-link-verification) method is called to verify the email address. Error handling is included to handle any errors that occur during the verification process.

<Tabs items={["Next.js"]}>
<Tab>
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-usage/clerk-idp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Learn how to use Clerk as an Identity Provider to facilitate Single
---

> [!WARNING]
> **This feature is not designed for handling authentication directly in your application.** To handle authentication _in your_ application, you can [configure one of the many social providers that Clerk offers](/docs/authentication/social-connections/overview#configuration), such as Google.
> **This feature is not designed for handling authentication directly in your application.** To handle authentication _in your_ application, you can [configure one of the many social providers that Clerk offers](/docs/authentication/social-connections/overview#enable-a-social-connection), such as Google.

Clerk can be configured as an OAuth 2.0 and OpenID Connect (OIDC) Identity Provider (IdP) to facilitate Single Sign-On (SSO) with other clients that support the protocols. This feature allows users to authenticate to other applications using their Clerk credentials, enabling user information sharing between your Clerk application and OAuth clients.

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced-usage/satellite-domains.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ To access authentication state from a satellite domain, users will be transparen

<Tabs items={["Next.js", "Remix"]}>
<Tab>
In a Next.js application, you must set the properties in the [`<ClerkProvider>`](/docs/components/clerk-provider) component _and_ in your [`clerkMiddleware()`](/docs/references/nextjs/clerk-middleware#clerk-middleware).
In a Next.js application, you must set the properties in the [`<ClerkProvider>`](/docs/components/clerk-provider) component _and_ in your [`clerkMiddleware()`](/docs/references/nextjs/clerk-middleware).

- In the Next project associated with your primary domain, only the `signInUrl` prop needs to be configured as shown in the following example:

Expand Down
4 changes: 2 additions & 2 deletions docs/authentication/configuration/session-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ By default, signing out from a currently active account in a multi-session app w

If a sign-in URL is not set, signing out will navigate to Clerk's Account Portal `/sign-in/choose` page, allowing the user to choose which account to switch into.

If a sign-in URL is set, either through the [`signInUrl`](/docs/components/clerk-provider#properties:~:text=Name-,signInUrl,-Type) prop on `<ClerkProvider>` or the [`CLERK_SIGN_IN_URL` environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects), signing out will navigate to that URL's `/choose` route. For example, if `signInUrl` or `CLERK_SIGN_IN_URL` is set to `https://example.com/sign-in`, signing out of a multi-session app will navigate to `https://example.com/sign-in/choose`.
If a sign-in URL is set, either through the [`signInUrl`](/docs/components/clerk-provider) prop on `<ClerkProvider>` or the [`CLERK_SIGN_IN_URL` environment variable](/docs/deployments/clerk-environment-variables#sign-in-and-sign-up-redirects), signing out will navigate to that URL's `/choose` route. For example, if `signInUrl` or `CLERK_SIGN_IN_URL` is set to `https://example.com/sign-in`, signing out of a multi-session app will navigate to `https://example.com/sign-in/choose`.

<If sdk={["nextjs", "react", "expo", "react-router", "tanstack-react-start"]}>
To redirect to a custom route, pass the [`afterMultiSessionSingleSignOutUrl`](/docs/components/clerk-provider#properties:~:text=afterMultiSessionSingleSignOutUrl) property to `<ClerkProvider>`.
To redirect to a custom route, pass the [`afterMultiSessionSingleSignOutUrl`](/docs/components/clerk-provider#properties) property to `<ClerkProvider>`.
</If>

## Customize session token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ To update your identifiers after your application has been created:
1. In the Clerk Dashboard, navigate to the [**Email, phone, username**](https://dashboard.clerk.com/last-active?path=user-authentication/email-phone-username) page.
1. In the **Contact information** section, you can select **Email address** and **Phone number** as identifiers. In the **Username** section, you can select **Username** as an identifier.

## Personal information

Personal information is extra information that you can collect from users during the sign-up process. Currently, the only personal information that you can collect is a first name and last name. By default, this information is not collected. To configure this feature:

1. In the Clerk Dashboard, navigate to the [**Email, phone, username**](https://dashboard.clerk.com/last-active?path=user-authentication/email-phone-username) page.
1. In the **Personal information** section, enable **Name**. By default, providing a first name and last name is optional. To make it required, select the settings icon next to **Name** and enable **Required**.

## Authentication strategies

Authentication strategies are methods that users can use to sign up and sign in to your application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ This guide shows you how to set up a SAML connection with a custom IdP in Clerk.

Mapping the claims in your IdP to the attributes in Clerk ensures that the data from your IdP is correctly mapped to the data in Clerk.

In the Clerk Dashboard, find the **Attribute mapping** section. Here, you are shown what properties on the [`User`](/docs/users/overview#user-object) object in Clerk are being mapped to the claims in your IdP.
In the Clerk Dashboard, find the **Attribute mapping** section. Here, you are shown what properties on the [`User`](/docs/references/javascript/user) object in Clerk are being mapped to the claims in your IdP.

In your IdP dashboard, there should be a section where you can map the IdP's claims to the attributes in Clerk. For example, Google has a `Primary email` claim that needs to be mapped to Clerk's `mail` property. During SAML configuration in the Google dashboard, Google provides a section where these claims can be mapped.

If you have additional claims that you would like to map to Clerk that are not listed in the **Attribute mapping** section, you can do so by following the steps in the [Map other claims](#map-other-claims-optional) section.

### Map other claims (optional)

In Clerk, the [`User`](/docs/users/overview#user-object) object has a `publicMetadata` property that you can use to store additional information about your users.
In Clerk, the [`User`](/docs/references/javascript/user) object has a `publicMetadata` property that you can use to store additional information about your users.

To map other claims from your IdP that do not have a direct mapping to Clerk attributes, you can map them to the `publicMetadata` property. To do this, prepend the Clerk claims with `public_metadata_` during the mapping process.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ To make the setup process easier, it's recommended to keep two browser tabs open

### Map other claims (optional)

In Clerk, the [`User`](/docs/users/overview#user-object) object has a `publicMetadata` property that you can use to store additional information about your users.
In Clerk, the [`User`](/docs/references/javascript/user) object has a `publicMetadata` property that you can use to store additional information about your users.

To map other claims from Google that don't have a direct mapping to Clerk attributes, you can map them to Clerk's `publicMetadata` property. To do this, prepend the Clerk claims with `public_metadata_` during the mapping process.

Expand Down
2 changes: 1 addition & 1 deletion docs/backend-requests/resources/session-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You can also create custom tokens using a [JWT template](/docs/backend-requests/

The Clerk session token is stored in a cookie. All modern browsers [limit the maximum size of a cookie to 4kb](https://datatracker.ietf.org/doc/html/rfc2109#section-6.3). Exceeding this limit can have adverse effects, including a possible infinite redirect loop for users who exceed this size in Next.js applications.

A session token with the [default session claims](#default-session-claims) won't run into this issue, as this configuration produces a cookie significantly smaller than 4kb. However, this limitation becomes relevant when implementing a [custom session token](/docs/backend-requests/custom-session-token). In this case, it's recommended to move particularly large claims out of the token and fetch these using a separate API call from your backend.
A session token with the [default session claims](#session-claims) won't run into this issue, as this configuration produces a cookie significantly smaller than 4kb. However, this limitation becomes relevant when implementing a [custom session token](/docs/backend-requests/custom-session-token). In this case, it's recommended to move particularly large claims out of the token and fetch these using a separate API call from your backend.

Claims to monitor for size limits:

Expand Down
2 changes: 1 addition & 1 deletion docs/components/authentication/sign-in.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ All props are optional.
- `transferable`
- `boolean`

Indicates whether or not sign in attempts are transferable to the sign up flow. Defaults to `true`. When set to `false`, prevents opaque sign ups when a user attempts to sign in via OAuth with an email that doesn't exist. See [OAuth account transfer flows](/docs/custom-flows/oauth-connections#o-auth-account-transfer-flows) for more information.
Indicates whether or not sign in attempts are transferable to the sign up flow. Defaults to `true`. When set to `false`, prevents opaque sign ups when a user attempts to sign in via OAuth with an email that doesn't exist.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/components/organization/organization-profile.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The `<OrganizationProfile />` component allows users to manage their organizatio

This component's **General** tab displays the organization's information and the **Leave organization** button. Admins will be able to see the **Update profile** button, **Verified domains** section, and **Delete organization** button.

The **Members** tab shows the organization's members along with their join dates and roles. Admins will have the ability to invite a member, change a member's role, or remove them from the organization. Admins will have tabs within the **Members** tab to view the organization's [invitations](/docs/organizations/overview#organization-invitations) and [requests](/docs/organizations/overview#membership-requests).
The **Members** tab shows the organization's members along with their join dates and roles. Admins will have the ability to invite a member, change a member's role, or remove them from the organization. Admins will have tabs within the **Members** tab to view the organization's [invitations](/docs/organizations/overview#organization-invitations) and [requests](/docs/organizations/verified-domains#membership-requests).

## Properties

Expand Down
4 changes: 2 additions & 2 deletions docs/custom-flows/email-links.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This guide demonstrates how to use Clerk's API to build a custom flow for handli
1. The `SignUp` object is used to access the [`createEmailLinkFlow()`](/docs/references/javascript/types/email-address#create-email-link-flow) method.
1. The `createEmailLinkFlow()` method is used to access the `startEmailLinkFlow()` method.
1. The `startEmailLinkFlow()` method is called with the `redirectUrl` parameter set to `/sign-up/verify`. It sends an email with a verification link to the user. When the user visits the link, they are redirected to the URL that was provided.
1. On the `/sign-up/verify` page, the [`useClerk()`](/docs/hooks/use-clerk) hook is used to get the [`handleEmailLinkVerification()`](/docs/references/javascript/clerk/handle-navigation#handle-email-link-verification) method.
1. On the `/sign-up/verify` page, the [`useClerk()`](/docs/hooks/use-clerk) hook is used to get the [`handleEmailLinkVerification()`](/docs/references/javascript/clerk#handle-email-link-verification) method.
1. The `handleEmailLinkVerification()` method is called to verify the email address. Error handling is included to handle any errors that occur during the verification process.

<Tabs items={["Next.js"]}>
Expand Down Expand Up @@ -277,7 +277,7 @@ This guide demonstrates how to use Clerk's API to build a custom flow for handli
1. The `SignIn` object is used to access the [`createEmailLinkFlow()`](/docs/references/javascript/types/email-address#create-email-link-flow) method.
1. The `createEmailLinkFlow()` method is used to access the `startEmailLinkFlow()` method.
1. The `startEmailLinkFlow()` method is called with the `redirectUrl` parameter set to `/sign-in/verify`. It sends an email with a verification link to the user. When the user visits the link, they are redirected to the URL that was provided.
1. On the `/sign-in/verify` page, the [`useClerk()`](/docs/hooks/use-clerk) hook is used to get the [`handleEmailLinkVerification()`](/docs/references/javascript/clerk/handle-navigation#handle-email-link-verification) method.
1. On the `/sign-in/verify` page, the [`useClerk()`](/docs/hooks/use-clerk) hook is used to get the [`handleEmailLinkVerification()`](/docs/references/javascript/clerk#handle-email-link-verification) method.
1. The `handleEmailLinkVerification()` method is called to verify the email address. Error handling is included to handle any errors that occur during the verification process.

<Tabs items={["Next.js"]}>
Expand Down
2 changes: 1 addition & 1 deletion docs/custom-flows/error-handling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ The following example uses the [email & password sign-in custom flow](/docs/cust

### User locked

If you have [account lockout](/docs/security/user-lock-guide) enabled on your instance and the user reaches the maximum allowed attempts ([see list of relevant actions here](/docs/security/user-lock-guide#related-actions)), you will receive an HTTP status of `403 (Forbidden)` and the following error payload:
If you have [account lockout](/docs/security/user-lock-guide) enabled on your instance and the user reaches the maximum allowed attempts ([see list of relevant actions here](/docs/security/user-lock-guide#actions)), you will receive an HTTP status of `403 (Forbidden)` and the following error payload:

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs/custom-flows/manage-membership-requests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn how to use the Clerk API to build a custom flow for managing

<Include src="_partials/custom-flows-callout" />

This guide will demonstrate how to use the Clerk API to build a custom flow for managing [organization membership requests](/docs/organizations/overview#membership-requests).
This guide will demonstrate how to use the Clerk API to build a custom flow for managing [organization membership requests](/docs/organizations/verified-domains#membership-requests).

<Tabs items={["Next.js", "JavaScript"]}>
<Tab>
Expand Down
2 changes: 1 addition & 1 deletion docs/custom-flows/oauth-connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ You must configure your application instance through the Clerk Dashboard for the
The following example:

1. Uses the [`useSSO()`](/docs/references/expo/use-sso) hook to access the `startSSOFlow()` method.
1. Calls the `startSSOFlow()` method with the `strategy` param set to `oauth_google`, but you can use any of the [supported OAuth strategies](/docs/references/javascript/types/sso#oauth-strategy). The optional `redirect_url` param is also set in order to redirect the user once they finish the authentication flow.
1. Calls the `startSSOFlow()` method with the `strategy` param set to `oauth_google`, but you can use any of the [supported OAuth strategies](/docs/references/javascript/types/sso#o-auth-strategy). The optional `redirect_url` param is also set in order to redirect the user once they finish the authentication flow.
- If authentication is successful, the `setActive()` method is called to set the active session with the new `createdSessionId`.
- If authentication is not successful, you can handle the missing requirements, such as MFA, using the [`signIn`](/docs/references/javascript/sign-in) or [`signUp`](/docs/references/javascript/sign-up) object returned from `startSSOFlow()`, depending on if the user is signing in or signing up. These objects include properties, like `status`, that can be used to determine the next steps. See the respective linked references for more information.

Expand Down
4 changes: 2 additions & 2 deletions docs/custom-flows/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ Sign-ins are initiated by creating a `SignIn` object on the current `Client`. If
The following steps outline the sign-in process:

1. Initiate the sign-in process by collecting the user's authentication information and passing the appropriate parameters to the [`create()`](/docs/references/javascript/sign-in#create) method.
1. Prepare the [first factor verification](/docs/references/javascript/sign-in#first-factor). Users must complete a first factor verification to prove their identity. This can be something like providing a password, an email link, a one-time code (OTP), a Web3 wallet address, or providing proof of their identity through an external social account (SSO/OAuth).
1. Prepare the first factor verification. Users must complete a first factor verification to prove their identity. This can be something like providing a password, an email link, a one-time code (OTP), a Web3 wallet address, or providing proof of their identity through an external social account (SSO/OAuth).
1. Attempt to complete the first factor verification.
1. Optionally, if you have enabled [multi-factor](/docs/authentication/configuration/sign-up-sign-in-options) for your application, you will need to prepare the [second factor verification](/docs/references/javascript/sign-in#second-factor) for users who have set up 2FA for their account.
1. Optionally, if you have enabled [multi-factor](/docs/authentication/configuration/sign-up-sign-in-options) for your application, you will need to prepare the second factor verification for users who have set up 2FA for their account.
1. Attempt to complete the second factor verification.
1. If verification is successful, set the newly created session as the active session by passing the `SignIn.createdSessionId` to the [`setActive()`](/docs/references/javascript/clerk#set-active) method on the `Clerk` object.

Expand Down
Loading