From 4c071e8893b58a9c6dc484cc8139e1f11f6845b0 Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Fri, 12 Sep 2025 13:17:10 -0400 Subject: [PATCH 1/4] wip --- docs/_partials/backend/usage.mdx | 2 +- docs/_partials/fastify/get-auth.mdx | 2 +- docs/_partials/nextjs/build-clerk-props.mdx | 2 +- docs/_partials/nextjs/get-auth.mdx | 2 +- docs/getting-started/quickstart.expressjs.mdx | 2 +- .../getting-started/quickstart.js-backend.mdx | 38 ++-- .../social-connections/overview.mdx | 200 ++++++++++++++---- .../account-updates/user-impersonation.mdx | 4 +- .../guides/development/migrating/overview.mdx | 2 +- .../sdk-development/backend-only.mdx | 2 +- docs/guides/organizations/invitations.mdx | 12 +- docs/guides/organizations/metadata.mdx | 6 +- docs/guides/sessions/force-token-refresh.mdx | 2 +- .../sessions/manual-jwt-verification.mdx | 4 +- docs/guides/sessions/session-tokens.mdx | 14 +- docs/guides/users/extending.mdx | 14 +- docs/guides/users/inviting.mdx | 12 +- docs/guides/users/managing.mdx | 16 +- docs/guides/users/reading.mdx | 4 +- docs/guides/users/reading.nuxt.mdx | 4 +- docs/guides/users/reading.react-router.mdx | 8 +- docs/guides/users/reading.remix.mdx | 6 +- .../users/reading.tanstack-react-start.mdx | 4 +- docs/references/astro/overview.mdx | 2 +- .../allowlist/create-allowlist-identifier.mdx | 2 +- .../allowlist/delete-allowlist-identifier.mdx | 2 +- .../get-allowlist-identifier-list.mdx | 2 +- .../backend/authenticate-request.mdx | 6 +- .../billing/cancel-subscription-item.mdx | 2 +- .../get-organization-billing-subscription.mdx | 2 +- .../backend/billing/get-plan-list.mdx | 2 +- .../billing/get-user-billing-subscription.mdx | 2 +- docs/references/backend/client/get-client.mdx | 2 +- .../backend/client/verify-client.mdx | 2 +- .../backend/domains/delete-domain.mdx | 2 +- .../email-addresses/create-email-address.mdx | 2 +- .../email-addresses/delete-email-address.mdx | 2 +- .../email-addresses/get-email-address.mdx | 2 +- .../email-addresses/update-email-address.mdx | 2 +- .../backend/invitations/create-invitation.mdx | 2 +- .../invitations/get-invitation-list.mdx | 2 +- .../backend/invitations/revoke-invitation.mdx | 2 +- .../backend/m2m-tokens/create-token.mdx | 2 +- .../backend/m2m-tokens/revoke-token.mdx | 2 +- .../backend/m2m-tokens/verify-token.mdx | 2 +- .../backend/oauth-applications/create.mdx | 2 +- .../backend/oauth-applications/delete.mdx | 2 +- .../backend/oauth-applications/get.mdx | 2 +- .../backend/oauth-applications/list.mdx | 2 +- .../oauth-applications/rotate-secret.mdx | 2 +- .../backend/oauth-applications/update.mdx | 2 +- .../create-organization-invitation-bulk.mdx | 2 +- .../create-organization-invitation.mdx | 2 +- .../create-organization-membership.mdx | 2 +- .../organization/create-organization.mdx | 2 +- .../organization/delete-organization-logo.mdx | 2 +- .../delete-organization-membership.mdx | 2 +- .../organization/delete-organization.mdx | 2 +- .../get-organization-invitation-list.mdx | 2 +- .../get-organization-invitation.mdx | 2 +- .../organization/get-organization-list.mdx | 2 +- .../get-organization-membership-list.mdx | 2 +- .../backend/organization/get-organization.mdx | 2 +- .../revoke-organization-invitation.mdx | 2 +- .../organization/update-organization-logo.mdx | 2 +- ...pdate-organization-membership-metadata.mdx | 2 +- .../update-organization-membership.mdx | 2 +- .../update-organization-metadata.mdx | 2 +- .../organization/update-organization.mdx | 2 +- docs/references/backend/overview.mdx | 2 +- .../phone-numbers/create-phone-number.mdx | 2 +- .../phone-numbers/delete-phone-number.mdx | 2 +- .../phone-numbers/get-phone-number.mdx | 2 +- .../phone-numbers/update-phone-number.mdx | 2 +- .../redirect-urls/create-redirect-url.mdx | 2 +- .../redirect-urls/delete-redirect-url.mdx | 2 +- .../redirect-urls/get-redirect-url-list.mdx | 2 +- .../redirect-urls/get-redirect-url.mdx | 2 +- .../create-saml-connection.mdx | 2 +- .../delete-saml-connection.mdx | 2 +- .../get-saml-connection-list.mdx | 2 +- .../saml-connections/get-saml-connection.mdx | 2 +- .../update-saml-connection.mdx | 2 +- .../backend/sessions/get-session-list.mdx | 2 +- .../backend/sessions/get-session.mdx | 2 +- .../references/backend/sessions/get-token.mdx | 4 +- .../backend/sessions/revoke-session.mdx | 2 +- .../backend/sessions/verify-session.mdx | 2 +- .../sign-in-tokens/create-sign-in-token.mdx | 2 +- .../sign-in-tokens/revoke-sign-in-token.mdx | 2 +- .../testing-tokens/create-testing-token.mdx | 2 +- docs/references/backend/user/ban-user.mdx | 2 +- docs/references/backend/user/create-user.mdx | 2 +- .../user/delete-user-profile-image.mdx | 4 +- docs/references/backend/user/delete-user.mdx | 2 +- .../backend/user/disable-user-mfa.mdx | 2 +- docs/references/backend/user/get-count.mdx | 2 +- .../user/get-organization-membership-list.mdx | 2 +- .../references/backend/user/get-user-list.mdx | 2 +- .../user/get-user-oauth-access-token.mdx | 2 +- docs/references/backend/user/get-user.mdx | 2 +- docs/references/backend/user/lock-user.mdx | 2 +- docs/references/backend/user/unban-user.mdx | 2 +- docs/references/backend/user/unlock-user.mdx | 2 +- .../backend/user/update-user-metadata.mdx | 2 +- .../user/update-user-profile-image.mdx | 4 +- docs/references/backend/user/update-user.mdx | 2 +- .../backend/user/verify-password.mdx | 2 +- docs/references/backend/user/verify-totp.mdx | 2 +- docs/references/backend/verify-token.mdx | 2 +- docs/references/backend/verify-webhook.mdx | 2 +- docs/references/express/overview.mdx | 2 +- .../nextjs/app-router/route-handlers.mdx | 4 +- docs/references/nuxt/overview.mdx | 2 +- docs/references/overview.mdx | 2 +- 115 files changed, 334 insertions(+), 224 deletions(-) diff --git a/docs/_partials/backend/usage.mdx b/docs/_partials/backend/usage.mdx index 4dd40c2489..262c3136dd 100644 --- a/docs/_partials/backend/usage.mdx +++ b/docs/_partials/backend/usage.mdx @@ -1,2 +1,2 @@ > [!NOTE] -> Importing `clerkClient` varies based on your framework. Refer to the [Backend SDK overview](/docs/js-backend/getting-started/quickstart) for usage details, including guidance on [how to access the `userId` and other properties](/docs/js-backend/getting-started/quickstart#get-the-user-id-and-other-properties). +> Importing `clerkClient` varies based on your framework. Refer to the [JS Backend SDK overview](/docs/js-backend/getting-started/quickstart) for usage details, including guidance on [how to access the `userId` and other properties](/docs/js-backend/getting-started/quickstart#get-the-user-id-and-other-properties). diff --git a/docs/_partials/fastify/get-auth.mdx b/docs/_partials/fastify/get-auth.mdx index 7936b6f203..ec714e234b 100644 --- a/docs/_partials/fastify/get-auth.mdx +++ b/docs/_partials/fastify/get-auth.mdx @@ -21,7 +21,7 @@ fastify.get('/protected', async (request, reply) => { return reply.code(401).send({ error: 'User not authenticated' }) } - // Use `clerkClient` to access Clerk's Backend SDK methods + // Use `clerkClient` to access Clerk's JS Backend SDK methods // and get the user's User object const user = await clerkClient.users.getUser(userId) diff --git a/docs/_partials/nextjs/build-clerk-props.mdx b/docs/_partials/nextjs/build-clerk-props.mdx index a964abcb54..0a663f6961 100644 --- a/docs/_partials/nextjs/build-clerk-props.mdx +++ b/docs/_partials/nextjs/build-clerk-props.mdx @@ -18,7 +18,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { } } - // Initialize the Backend SDK + // Initialize the JS Backend SDK const client = await clerkClient() // Get the user's full `Backend User` object diff --git a/docs/_partials/nextjs/get-auth.mdx b/docs/_partials/nextjs/get-auth.mdx index 5ac27a3dd3..d916408ae2 100644 --- a/docs/_partials/nextjs/get-auth.mdx +++ b/docs/_partials/nextjs/get-auth.mdx @@ -11,7 +11,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) return res.status(401).json({ error: 'Unauthorized' }) } - // Initialize the Backend SDK + // Initialize the JS Backend SDK const client = await clerkClient() // Get the user's full Backend User object diff --git a/docs/getting-started/quickstart.expressjs.mdx b/docs/getting-started/quickstart.expressjs.mdx index e15253f9ed..5309750522 100644 --- a/docs/getting-started/quickstart.expressjs.mdx +++ b/docs/getting-started/quickstart.expressjs.mdx @@ -131,7 +131,7 @@ Learn how to integrate Clerk into your Express backend for secure user authentic // Use `getAuth()` to get the user's `userId` const { userId } = getAuth(req) - // Use Clerk's JavaScript Backend SDK to get the user's User object + // Use Clerk's JS Backend SDK to get the user's User object const user = await clerkClient.users.getUser(userId) return res.json({ user }) diff --git a/docs/getting-started/quickstart.js-backend.mdx b/docs/getting-started/quickstart.js-backend.mdx index 0d32ba843c..d776c7b566 100644 --- a/docs/getting-started/quickstart.js-backend.mdx +++ b/docs/getting-started/quickstart.js-backend.mdx @@ -10,9 +10,9 @@ For example, if you wanted to get a list of all users in your application, inste ## Installation - + - If you are using the JavaScript Backend SDK on its own, you can install it using the following command: + If you are using the JS Backend SDK on its own, you can install it using the following command: ```bash {{ filename: 'terminal' }} @@ -34,7 +34,7 @@ For example, if you wanted to get a list of all users in your application, inste - Clerk SDKs expose an instance of the JavaScript Backend SDK for use in server environments, so there is no need to install it separately. + Clerk SDKs expose an instance of the JS Backend SDK for use in server environments, so there is no need to install it separately. @@ -44,7 +44,7 @@ All resource operations are mounted as sub-APIs on the `clerkClient` object. For To access a resource, you must first instantiate a `clerkClient` instance. - + To instantiate a `clerkClient` instance, you must call `createClerkClient()` and pass in [`options`](#create-clerk-client-options). @@ -103,7 +103,7 @@ To access a resource, you must first instantiate a `clerkClient` instance. ### Instantiate a custom `clerkClient` instance - If you would like to customize the behavior of the JavaScript Backend SDK, you can instantiate a `clerkClient` instance yourself by calling `createClerkClient()` and passing in [`options`](#create-clerk-client-options). + If you would like to customize the behavior of the JS Backend SDK, you can instantiate a `clerkClient` instance yourself by calling `createClerkClient()` and passing in [`options`](#create-clerk-client-options). @@ -125,7 +125,7 @@ To access a resource, you must first instantiate a `clerkClient` instance. import { createClerkClient } from '@clerk/remix/api.server' ``` - Use the following tabs to see examples of how to use the Backend SDK in Remix Loader and Action functions. + Use the following tabs to see examples of how to use the JS Backend SDK in Remix Loader and Action functions. @@ -273,7 +273,7 @@ To access a resource, you must first instantiate a `clerkClient` instance. ## Error handling -Backend SDK functions throw errors (`ClerkAPIResponseError`) when something goes wrong. You'll need to catch them in a `try/catch` block and handle them gracefully. For example: +JS Backend SDK functions throw errors (`ClerkAPIResponseError`) when something goes wrong. You'll need to catch them in a `try/catch` block and handle them gracefully. For example: ```ts {{ filename: 'example.ts' }} try { @@ -297,9 +297,9 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa - + - The following example demonstrates how to retrieve the authenticated user's ID using `request.auth` when you're not using a specific framework helper. It also shows how to use the Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user). + The following example demonstrates how to retrieve the authenticated user's ID using `request.auth` when you're not using a specific framework helper. It also shows how to use the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user). ```js import { createClerkClient } from '@clerk/backend' @@ -315,7 +315,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return null } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object @@ -325,7 +325,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa - The following examples demonstrate how to retrieve the authenticated user's ID using framework-specific auth helpers and how to use the Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user). + The following examples demonstrate how to retrieve the authenticated user's ID using framework-specific auth helpers and how to use the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user). {/* TODO: The following Tabs example is duplicated in the guides/how-clerk-works/session-tokens.mdx file. It cannot be a partial to be reused across both files because this example includes a partial and partials cannot include partials. Also, the text in each of these tabs is removed in the other file as its not relevant to that file's example. So keep these two Tabs examples in sync please. */} @@ -350,7 +350,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa const client = await clerkClient() - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await client.users.getUser(userId) // Return the Backend User object @@ -377,7 +377,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return new Response('Unauthorized', { status: 401 }) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient(context).users.getUser(userId) // Return the Backend User object @@ -405,7 +405,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa res.status(401).json({ error: 'User not authenticated' }) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object @@ -417,7 +417,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa For React Router, the `Auth` object is accessed using the `getAuth()` function. [Learn more about using `getAuth()`](/docs/react-router/guides/users/reading#server-side). - ```tsx {{ filename: 'src/routes/profile.tsx' }} + ```tsx {{ filename: 'app/routes/profile.tsx' }} import { redirect } from 'react-router' import { getAuth } from '@clerk/react-router/ssr.server' import { createClerkClient } from '@clerk/react-router/api.server' @@ -432,7 +432,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -463,7 +463,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -517,10 +517,10 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return json({ error: 'Unauthorized' }, { status: 401 }) } - // Instantiate the Backend SDK + // Instantiate the JS Backend SDK const clerkClient = createClerkClient({ secretKey: import.meta.env.CLERK_SECRET_KEY }) - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object diff --git a/docs/guides/configure/auth-strategies/social-connections/overview.mdx b/docs/guides/configure/auth-strategies/social-connections/overview.mdx index 9283a8377e..1e847b7cd7 100644 --- a/docs/guides/configure/auth-strategies/social-connections/overview.mdx +++ b/docs/guides/configure/auth-strategies/social-connections/overview.mdx @@ -74,7 +74,7 @@ Use the following tabs to see how to add additional OAuth scopes to the ` + + ```tsx {{ filename: 'app/api/notion/route.tsx' }} + import { auth, clerkClient } from '@clerk/nextjs/server' + import { NextResponse } from 'next/server' + + export async function GET() { + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object + const { isAuthenticated, userId } = await auth() + + // Protect the route from unauthenticated users + if (!isAuthenticated) { + return NextResponse.json({ message: 'User not found' }) + } + + // Use the JS Backend SDK to get the OAuth access token for the user + const provider = 'notion' + + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + const client = await clerkClient() + + // Use the JS Backend SDK to get the user's OAuth access token + const clerkResponse = await client.users.getUserOauthAccessToken(userId, provider) + const accessToken = clerkResponse.data[0].token || '' + if (!accessToken) { + return NextResponse.json({ message: 'Access token not found' }, { status: 401 }) + } + + // Fetch the user data from the Notion API + // This endpoint fetches a list of users + // https://developers.notion.com/reference/get-users + const notionUrl = 'https://api.notion.com/v1/users' + + const notionResponse = await fetch(notionUrl, { + headers: { + Authorization: `Bearer ${accessToken}`, + 'Notion-Version': '2022-06-28', + }, + }) + + // Handle the response from the Notion API + const notionData = await notionResponse.json() + + return NextResponse.json({ message: notionData }) + } + ``` + + + + ```js {{ filename: 'notion.js' }} + import { createClerkClient, getAuth } from '@clerk/express' + import express from 'express' + + const app = express() + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }) + + app.get('/user', async (req, res) => { + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object + const { isAuthenticated, userId } = getAuth(req) + + // Protect the route from unauthenticated users + if (!isAuthenticated) { + res.status(401).json({ error: 'User not authenticated' }) + } + + // Use the JS Backend SDK to get the user's OAuth access token + const provider = 'notion' + const clerkResponse = await clerkClient.users.getUserOauthAccessToken(userId, provider) + const accessToken = clerkResponse.data[0].token || '' + + if (!accessToken) { + res.status(401).json({ error: 'Access token not found' }) + } + + // Fetch the user data from the Notion API + // This endpoint fetches a list of users + // https://developers.notion.com/reference/get-users + const notionUrl = 'https://api.notion.com/v1/users' + + const notionResponse = await fetch(notionUrl, { + headers: { + Authorization: `Bearer ${accessToken}`, + 'Notion-Version': '2022-06-28', + }, + }) + + // Handle the response from the Notion API + const notionData = await notionResponse.json() + + res.json(notionData) + }) + ``` + + + + ```js + import { createClerkClient } from '@clerk/backend' + + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }) + + async function getNotionData(request) { + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object + const { isAuthenticated, userId } = request.auth + + // Protect the route from unauthenticated users + if (!isAuthenticated) { + return null + } + + // Use the JS Backend SDK to get the user's OAuth access token + const provider = 'notion' + const clerkResponse = await clerkClient.users.getUserOauthAccessToken(userId, provider) + const accessToken = clerkResponse.data[0].token || '' + if (!accessToken) { + return null + } + + // Fetch the user data from the Notion API + // This endpoint fetches a list of users + // https://developers.notion.com/reference/get-users + const notionUrl = 'https://api.notion.com/v1/users' + + const notionResponse = await fetch(notionUrl, { + headers: { + Authorization: `Bearer ${accessToken}`, + 'Notion-Version': '2022-06-28', + }, + }) + + // Handle the response from the Notion API + const notionData = await notionResponse.json() + + // Return the Notion data + return notionData + } + ``` + + ## Add a social connection after sign-up diff --git a/docs/guides/development/custom-flows/account-updates/user-impersonation.mdx b/docs/guides/development/custom-flows/account-updates/user-impersonation.mdx index 8a00377b7c..2d4e6ead8a 100644 --- a/docs/guides/development/custom-flows/account-updates/user-impersonation.mdx +++ b/docs/guides/development/custom-flows/account-updates/user-impersonation.mdx @@ -19,7 +19,7 @@ This guide will walk you through how to build a custom flow that handles user im Use the following tabs to view the code for: - - The main page that gets the list of the application's users using the [JavaScript Backend SDK](/docs/references/backend/user/get-user-list) + - The main page that gets the list of the application's users using the [JS Backend SDK](/docs/references/backend/user/get-user-list) - The Client Component that has the UI for displaying the users and the ability to impersonate them - The Server Action that generates the actor token using the [Backend API](/docs/reference/backend-api/tag/actor-tokens/post/actor_tokens){{ target: '_blank' }} @@ -38,7 +38,7 @@ This guide will walk you through how to build a custom flow that handles user im const client = await clerkClient() - // Fetch list of application's users using Clerk's Backend SDK + // Fetch list of application's users using Clerk's JS Backend SDK const users = await client.users.getUserList() // This page needs to be a server component to use clerkClient.users.getUserList() diff --git a/docs/guides/development/migrating/overview.mdx b/docs/guides/development/migrating/overview.mdx index b1b2c14d8a..6cebc2ce2f 100644 --- a/docs/guides/development/migrating/overview.mdx +++ b/docs/guides/development/migrating/overview.mdx @@ -87,4 +87,4 @@ To export your users' data: ### Access user data in the backend -You can programmatically retrieve a list of your user's and their information by using the [`GetUserList`](/docs/reference/backend-api/tag/Users#operation/GetUserList){{ target: '_blank' }} Backend API endpoint, or the JavaScript Backend SDK's [`getUserList()`](/docs/references/backend/user/get-user-list) method which is a wrapper around the Backend API endpoint. +You can programmatically retrieve a list of your user's and their information by using the [`GetUserList`](/docs/reference/backend-api/tag/Users#operation/GetUserList){{ target: '_blank' }} Backend API endpoint, or the JS Backend SDK's [`getUserList()`](/docs/references/backend/user/get-user-list) method which is a wrapper around the Backend API endpoint. diff --git a/docs/guides/development/sdk-development/backend-only.mdx b/docs/guides/development/sdk-development/backend-only.mdx index 265292e68a..62cdbf09b5 100644 --- a/docs/guides/development/sdk-development/backend-only.mdx +++ b/docs/guides/development/sdk-development/backend-only.mdx @@ -6,7 +6,7 @@ sdk: sdk-development When creating a backend-only SDK, you have two options for implementing the [BAPI](/docs/guides/development/sdk-development/terminology) endpoints: either [develop a backend SDK that encompasses all BAPI endpoints](#implementation-bapi) or [create an SDK tailored for an existing backend framework](#implementation-node-js-backend-framework). -The source of truth for all BAPI endpoints is the [BAPI reference docs](/docs/reference/backend-api){{ target: '_blank' }}. For Node.js backend frameworks, you can build on top of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart). +The source of truth for all BAPI endpoints is the [BAPI reference docs](/docs/reference/backend-api){{ target: '_blank' }}. For Node.js backend frameworks, you can build on top of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart). ## Expected features diff --git a/docs/guides/organizations/invitations.mdx b/docs/guides/organizations/invitations.mdx index 724141ab51..2e0df94218 100644 --- a/docs/guides/organizations/invitations.mdx +++ b/docs/guides/organizations/invitations.mdx @@ -25,11 +25,11 @@ To create an organization invitation on the client-side, see the [dedicated guid ### Server-side -To create organization invitations on the server-side, use the [Backend API](/docs/reference/backend-api/tag/organization-invitations/post/organizations/\{organization_id}/invitations){{ target: '_blank' }} either by using a cURL command or the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart). The JavaScript Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. +To create organization invitations on the server-side, use the [Backend API](/docs/reference/backend-api/tag/organization-invitations/post/organizations/\{organization_id}/invitations){{ target: '_blank' }} either by using a cURL command or the [JS Backend SDK](/docs/js-backend/getting-started/quickstart). The JS Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. Use the following tabs to see examples for each method. - + The following example demonstrates how to create an organization invitation using cURL. @@ -59,7 +59,7 @@ Use the following tabs to see examples for each method. - To use the Backend SDK to create an invitation, see the [`createOrganizationInvitation()`](/docs/references/backend/organization/create-organization-invitation) reference documentation. + To use the JS Backend SDK to create an invitation, see the [`createOrganizationInvitation()`](/docs/references/backend/organization/create-organization-invitation) reference documentation. @@ -111,11 +111,11 @@ To revoke an invitation client-side, see the [dedicated guide](/docs/guides/deve ### Server-side -To revoke an invitation server-side, use the [Backend API](/docs/reference/backend-api/tag/organization-invitations/post/organizations/\{organization_id}/invitations/\{invitation_id}/revoke){{ target: '_blank' }}. either by using a cURL command or the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart). The JavaScript Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. +To revoke an invitation server-side, use the [Backend API](/docs/reference/backend-api/tag/organization-invitations/post/organizations/\{organization_id}/invitations/\{invitation_id}/revoke){{ target: '_blank' }}. either by using a cURL command or the [JS Backend SDK](/docs/js-backend/getting-started/quickstart). The JS Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. Use the following tabs to see examples for each method. - + The following example demonstrates how to revoke an invitation using cURL. @@ -141,6 +141,6 @@ Use the following tabs to see examples for each method. - To use the Backend SDK to revoke an organization invitation, see the [`revokeOrganizationInvitation()`](/docs/references/backend/organization/revoke-organization-invitation) reference documentation. + To use the JS Backend SDK to revoke an organization invitation, see the [`revokeOrganizationInvitation()`](/docs/references/backend/organization/revoke-organization-invitation) reference documentation. diff --git a/docs/guides/organizations/metadata.mdx b/docs/guides/organizations/metadata.mdx index 475c7f3da3..24f185ef12 100644 --- a/docs/guides/organizations/metadata.mdx +++ b/docs/guides/organizations/metadata.mdx @@ -22,7 +22,7 @@ Both the `Organization` and `Organization Membership` objects have the metadata There are two ways to set organization metadata: - In the Clerk Dashboard -- Using the [Backend SDK](/docs/js-backend/getting-started/quickstart) +- Using the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) ### In the Clerk Dashboard @@ -30,8 +30,8 @@ There are two ways to set organization metadata: 1. Select the organization you want to update. 1. In the **Organization metadata** section, select **Edit** next to the metadata you want to update. -### Using the Backend SDK +### Using the JS Backend SDK -To ease the flow of setting metadata, Clerk provides the `updateOrganizationMetadata()` and `updateOrganizationMembershipMetadata()` methods from the [Backend SDK](/docs/js-backend/getting-started/quickstart), which is a wrapper around the [Backend API](/docs/reference/backend-api){{ target: '_blank' }}. +To ease the flow of setting metadata, Clerk provides the `updateOrganizationMetadata()` and `updateOrganizationMembershipMetadata()` methods from the [JS Backend SDK](/docs/js-backend/getting-started/quickstart), which is a wrapper around the [Backend API](/docs/reference/backend-api){{ target: '_blank' }}. diff --git a/docs/guides/sessions/force-token-refresh.mdx b/docs/guides/sessions/force-token-refresh.mdx index 6bb681f3e3..bc47f8896f 100644 --- a/docs/guides/sessions/force-token-refresh.mdx +++ b/docs/guides/sessions/force-token-refresh.mdx @@ -61,7 +61,7 @@ To do so, follow the [guide on customizing your session token](/docs/guides/sess // such as the `users` resource, which includes methods for managing users const client = await clerkClient() - // Use the Backend SDK's `updateUserMetadata()` method to update the user's birthday + // Use the JS Backend SDK's `updateUserMetadata()` method to update the user's birthday await client.users.updateUserMetadata(userId, { publicMetadata: { birthday, diff --git a/docs/guides/sessions/manual-jwt-verification.mdx b/docs/guides/sessions/manual-jwt-verification.mdx index 4d20d577f1..9e9ffff828 100644 --- a/docs/guides/sessions/manual-jwt-verification.mdx +++ b/docs/guides/sessions/manual-jwt-verification.mdx @@ -5,11 +5,11 @@ description: Learn how to manually verify Clerk-generated session tokens (JWTs). Your Clerk-generated [session tokens](/docs/guides/sessions/session-tokens) are essentially JWTs which are signed using your instance's private key and can be verified using your instance's public key. Depending on your architecture, these tokens will be in your backend requests either via a cookie named `__session` or via the Authorization header. -For every request, you must validate the token to ensure it hasn't expired or been tampered with (i.e., it's authentic and secure). If these validations succeed, then the user is authenticated to your application and should be considered signed in. The `authenticateRequest()` method from the JavaScript Backend SDK handles these validations for you. Alternatively, you can manually verify the token without using the SDK. See the following sections for more information. +For every request, you must validate the token to ensure it hasn't expired or been tampered with (i.e., it's authentic and secure). If these validations succeed, then the user is authenticated to your application and should be considered signed in. The `authenticateRequest()` method from the JS Backend SDK handles these validations for you. Alternatively, you can manually verify the token without using the SDK. See the following sections for more information. ## Use `authenticateRequest()` to verify a session token -The [`authenticateRequest()`](/docs/references/backend/authenticate-request) method from the JavaScript Backend SDK accepts the `request` object and authenticates the session token in it. +The [`authenticateRequest()`](/docs/references/backend/authenticate-request) method from the JS Backend SDK accepts the `request` object and authenticates the session token in it. The following example uses the `authenticateRequest()` method to verify the session token. It also performs networkless authentication by passing `jwtKey`. This verifies if the user is signed into the application. For more information, including usage with higher-level SDKs, see the [`authenticateRequest()` reference](/docs/references/backend/authenticate-request). diff --git a/docs/guides/sessions/session-tokens.mdx b/docs/guides/sessions/session-tokens.mdx index 346ab508ed..be2497892f 100644 --- a/docs/guides/sessions/session-tokens.mdx +++ b/docs/guides/sessions/session-tokens.mdx @@ -167,7 +167,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin const client = await clerkClient() - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await client.users.getUser(userId) // Return the Backend User object @@ -192,7 +192,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin return new Response('Unauthorized', { status: 401 }) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient(context).users.getUser(userId) // Return the Backend User object @@ -218,7 +218,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin res.status(401).json({ error: 'User not authenticated' }) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object @@ -243,7 +243,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -272,7 +272,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -299,7 +299,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin // Prepare the data for the mutation const params = { firstName: 'John', lastName: 'Wicker' } - // // Use the Backend SDK's `updateUser()` method to update the Backend User object + // // Use the JS Backend SDK's `updateUser()` method to update the Backend User object const updatedUser = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, }).users.updateUser(userId, params) @@ -331,7 +331,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin // Instantiate the Backend SDK const clerkClient = createClerkClient({ secretKey: import.meta.env.CLERK_SECRET_KEY }) - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object diff --git a/docs/guides/users/extending.mdx b/docs/guides/users/extending.mdx index da97739880..080e946048 100644 --- a/docs/guides/users/extending.mdx +++ b/docs/guides/users/extending.mdx @@ -23,7 +23,7 @@ Public metadata is accessible by both the frontend and the backend, but can only #### Set public metadata - + @@ -120,7 +120,7 @@ There are multiple ways to retrieve public metadata. On the frontend, it's available on the [`User`](/docs/references/javascript/user) object, which can be accessed using the [`useUser()`](/docs/references/hooks/use-user) hook. -On the backend, it's available on the [Backend `User`](/docs/references/backend/types/backend-user) object which can be accessed using the JavaScript Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the public metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so _if you are retrieving the metadata frequently_, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). +On the backend, it's available on the [Backend `User`](/docs/references/backend/types/backend-user) object which can be accessed using the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the public metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so _if you are retrieving the metadata frequently_, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). ### Private metadata @@ -128,7 +128,7 @@ Private metadata is only accessible by the backend, which makes this useful for #### Set private metadata - + @@ -240,9 +240,9 @@ Private metadata is only accessible by the backend, which makes this useful for #### Retrieve private metadata -You can retrieve the private metadata for a user by using the JavaScript Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the private metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so if you are retrieving the metadata frequently, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). +You can retrieve the private metadata for a user by using the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the private metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so if you are retrieving the metadata frequently, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). - + @@ -347,7 +347,7 @@ The following examples demonstrate how to update `unsafeMetadata` on the server- - + @@ -527,7 +527,7 @@ There are multiple ways to retrieve unsafe metadata. On the frontend, it's available on the [`User`](/docs/references/javascript/user) object, which can be accessed using the [`useUser()`](/docs/references/hooks/use-user) hook. -On the backend, it's available on the [Backend `User`](/docs/references/backend/types/backend-user) object which can be accessed using the JavaScript Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the unsafe metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so if you are retrieving the metadata frequently, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). +On the backend, it's available on the [Backend `User`](/docs/references/backend/types/backend-user) object which can be accessed using the JavaScript JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the unsafe metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so if you are retrieving the metadata frequently, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). ## Metadata in the session token diff --git a/docs/guides/users/inviting.mdx b/docs/guides/users/inviting.mdx index f3d87625ec..1783d6b271 100644 --- a/docs/guides/users/inviting.mdx +++ b/docs/guides/users/inviting.mdx @@ -25,9 +25,9 @@ To invite users, navigate to the **Users** page from the top-level menu, then se ### Using Backend API -You can either use a cURL command or the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) to create an invitation. Clerk's JavaScript Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. Use the following tabs to see examples for each method. +You can either use a cURL command or the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) to create an invitation. Clerk's JS Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. Use the following tabs to see examples for each method. - + The following example demonstrates how to create an invitation using cURL. @@ -45,7 +45,7 @@ You can either use a cURL command or the [JavaScript Backend SDK](/docs/js-backe - To use the Backend SDK to create an invitation, see the [`createInvitation()` reference](/docs/references/backend/invitations/create-invitation). + To use the JS Backend SDK to create an invitation, see the [`createInvitation()` reference](/docs/references/backend/invitations/create-invitation). @@ -101,9 +101,9 @@ To revoke an invitation, navigate to the **Users** page from the top-level menu, ### Using Backend API -You can either use a cURL command or the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) to revoke an invitation. Use the following tabs to see examples for each method. +You can either use a cURL command or the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) to revoke an invitation. Use the following tabs to see examples for each method. - + The following example demonstrates how to revoke an invitation using cURL. @@ -121,7 +121,7 @@ You can either use a cURL command or the [JavaScript Backend SDK](/docs/js-backe - To use the Backend SDK to revoke an invitation, see the [`revokeInvitation()`](/docs/references/backend/invitations/revoke-invitation) reference documentation. + To use the JS Backend SDK to revoke an invitation, see the [`revokeInvitation()`](/docs/references/backend/invitations/revoke-invitation) reference documentation. diff --git a/docs/guides/users/managing.mdx b/docs/guides/users/managing.mdx index 94d8b1542c..1395c17b10 100644 --- a/docs/guides/users/managing.mdx +++ b/docs/guides/users/managing.mdx @@ -31,9 +31,9 @@ Depending on the level of abstraction you need, you can manage users in the fron #### In the backend -The [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments. +The [JS Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments. -There are many operations available for managing users, such as `getUser()`, `createUser()`, and `deleteUser()`. For more information, see the [Backend SDK reference docs](/docs/js-backend/getting-started/quickstart). +There are many operations available for managing users, such as `getUser()`, `createUser()`, and `deleteUser()`. For more information, see the [JS Backend SDK reference docs](/docs/js-backend/getting-started/quickstart). ## Create users @@ -53,13 +53,13 @@ You can create users in your app using Clerk's Backend API. Use the following tabs to see examples of how to create users using one of the following: -- Backend SDK +- JS Backend SDK - Express - cURL - + - The following example shows how to create a user using the JavaScript Backend SDK's [`createUser()`](/docs/references/backend/user/create-user) method from the `users` sub-api of the `clerkClient` instance. + The following example shows how to create a user using the JS Backend SDK's [`createUser()`](/docs/references/backend/user/create-user) method from the `users` sub-api of the `clerkClient` instance. @@ -134,13 +134,13 @@ You can delete users in your app using Clerk's Backend API. Use the following tabs to see examples of how to delete users using one of the following: -- Backend SDK +- JS Backend SDK - Express - cURL - + - The following example shows how to delete a user using the JavaScript Backend SDK's [`deleteUser()`](/docs/references/backend/user/delete-user) method from the `users` sub-api of the `clerkClient` instance. + The following example shows how to delete a user using the JS Backend SDK's [`deleteUser()`](/docs/references/backend/user/delete-user) method from the `users` sub-api of the `clerkClient` instance. diff --git a/docs/guides/users/reading.mdx b/docs/guides/users/reading.mdx index b8883141e7..b151e0f878 100644 --- a/docs/guides/users/reading.mdx +++ b/docs/guides/users/reading.mdx @@ -74,9 +74,9 @@ For Next.js applications using the Pages Router, the [`getAuth()`](/docs/referen In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. -The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. +The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. -In the following example, the `userId` is passed to the Backend SDK's `getUser()` method to get the user's full `Backend User` object. +In the following example, the `userId` is passed to the JS Backend SDK's `getUser()` method to get the user's full `Backend User` object. diff --git a/docs/guides/users/reading.nuxt.mdx b/docs/guides/users/reading.nuxt.mdx index d1ca36581f..1751b90e2f 100644 --- a/docs/guides/users/reading.nuxt.mdx +++ b/docs/guides/users/reading.nuxt.mdx @@ -36,9 +36,9 @@ const { isLoaded, isSignedIn, user } = useUser() The `Auth` object is available at `event.context.auth()` in your [event handlers](https://h3.unjs.io/guide/event-handler). This JavaScript object contains important authentication information like the current user's session ID, user ID, and organization ID, and an `isAuthenticated` property to protect your API routes from unauthenticated users. -In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user){{ target: '_blank' }} object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart){{ target: '_blank' }}, which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. +In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user){{ target: '_blank' }} object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart){{ target: '_blank' }}, which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. -The following example uses the `Auth` object to access the `userId` and `isAuthenticated` properties. The `userId` is passed to the Backend SDK's `getUser()` method to get the user's full `Backend User` object. +The following example uses the `Auth` object to access the `userId` and `isAuthenticated` properties. The `userId` is passed to the JS Backend SDK's `getUser()` method to get the user's full `Backend User` object. ```ts {{ filename: 'server/api/auth/index.ts' }} import { clerkClient } from '@clerk/nuxt/server' diff --git a/docs/guides/users/reading.react-router.mdx b/docs/guides/users/reading.react-router.mdx index 92cef49532..56fab53874 100644 --- a/docs/guides/users/reading.react-router.mdx +++ b/docs/guides/users/reading.react-router.mdx @@ -14,9 +14,9 @@ To access active session and user data on the server-side, use the [`getAuth()`] The [`getAuth()`](/docs/references/tanstack-react-start/get-auth) helper returns the [`Auth`](/docs/references/backend/types/auth-object) object of the currently active user, which contains important information like the current user's session ID, user ID, and organization ID, and the `isAuthenticated` property, which can be used to protect your API routes. -In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. +In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. -In the following example, the `userId` is passed to the Backend SDK's `getUser()` method to get the user's full `Backend User` object. +In the following example, the `userId` is passed to the JS Backend SDK's `getUser()` method to get the user's full `Backend User` object. ```tsx {{ filename: 'app/routes/profile.tsx' }} import { redirect } from 'react-router' @@ -33,7 +33,7 @@ export async function loader(args: Route.LoaderArgs) { return redirect('/sign-in?redirect_url=' + args.request.url) } - // Instantiate the Backend SDK and get the user's full `Backend User` object + // Instantiate the JS Backend SDK and get the user's full `Backend User` object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -78,7 +78,7 @@ export async function action(args: Route.ActionArgs) { const formData = await args.request.formData() const name = formData.get('name')?.toString() - // Instantiate the Backend SDK and get the user's full `Backend User` object + // Instantiate the JS Backend SDK and get the user's full `Backend User` object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, }).users.getUser(userId) diff --git a/docs/guides/users/reading.remix.mdx b/docs/guides/users/reading.remix.mdx index d9506c2b2a..0ec00ae442 100644 --- a/docs/guides/users/reading.remix.mdx +++ b/docs/guides/users/reading.remix.mdx @@ -12,7 +12,7 @@ Clerk provides a set of [hooks and helpers](/docs/references/remix/overview) tha The [`getAuth()`](/docs/references/remix/overview#get-auth) helper allows you to access the [`Auth` object](/docs/references/backend/types/auth-object){{ target: '_blank' }}, which includes the current user's `userId` and the `isAuthenticated` property, which can be used to protect your routes. -In the following example, the `userId` is passed to the Backend SDK's [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method to get the user's full `User` object. For information on how to use the Backend SDK, see the [Backend SDK documentation](/docs/js-backend/getting-started/quickstart){{ target: '_blank' }}. +In the following example, the `userId` is passed to the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method to get the user's full `User` object. For information on how to use the JS Backend SDK, see the [JS Backend SDK documentation](/docs/js-backend/getting-started/quickstart){{ target: '_blank' }}. @@ -30,7 +30,7 @@ In the following example, the `userId` is passed to the Backend SDK's [`getUser( return redirect('/sign-in?redirect_url=' + args.request.url) } - // Initialize the Backend SDK and get the user's full `Backend User` object + // Initialize the JS Backend SDK and get the user's full `Backend User` object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -56,7 +56,7 @@ In the following example, the `userId` is passed to the Backend SDK's [`getUser( return redirect('/sign-in?redirect_url=' + args.request.url) } - // Initialize the Backend SDK and get the user's full `Backend User` object + // Initialize the JS Backend SDK and get the user's full `Backend User` object const updatedUser = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, }).users.getUser(userId) diff --git a/docs/guides/users/reading.tanstack-react-start.mdx b/docs/guides/users/reading.tanstack-react-start.mdx index f2bfbdc571..04b6086287 100644 --- a/docs/guides/users/reading.tanstack-react-start.mdx +++ b/docs/guides/users/reading.tanstack-react-start.mdx @@ -10,9 +10,9 @@ Clerk provides a set of [hooks and helpers](/docs/references/tanstack-react-star The [`getAuth()`](/docs/references/tanstack-react-start/get-auth) helper returns the [`Auth`](/docs/references/backend/types/auth-object) object of the currently active user, which contains important information like the current user's session ID, user ID, and organization ID, and the `isAuthenticated` property, which can be used to protect your API routes. -In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. +In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. -In the following example, the `userId` is passed to the Backend SDK's `getUser()` method to get the user's full `Backend User` object. +In the following example, the `userId` is passed to the JS Backend SDK's `getUser()` method to get the user's full `Backend User` object. diff --git a/docs/references/astro/overview.mdx b/docs/references/astro/overview.mdx index 5f456d1bf8..82e3b69dd1 100644 --- a/docs/references/astro/overview.mdx +++ b/docs/references/astro/overview.mdx @@ -44,7 +44,7 @@ The `clerkMiddleware()` helper integrates Clerk authentication and authorization ### `clerkClient()` -[Clerk's JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JavaScript Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint. +[Clerk's JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint. All resource operations are mounted as sub-APIs on the `clerkClient` object. See the [reference documentation](/docs/js-backend/getting-started/quickstart#usage){{ target: '_blank' }} for more information. diff --git a/docs/references/backend/allowlist/create-allowlist-identifier.mdx b/docs/references/backend/allowlist/create-allowlist-identifier.mdx index 8456c6f45f..65879877d4 100644 --- a/docs/references/backend/allowlist/create-allowlist-identifier.mdx +++ b/docs/references/backend/allowlist/create-allowlist-identifier.mdx @@ -1,6 +1,6 @@ --- title: '`createAllowlistIdentifier()`' -description: Use Clerk's Backend SDK to add a new identifier to the allowlist. +description: Use Clerk's JS Backend SDK to add a new identifier to the allowlist. sdk: js-backend --- diff --git a/docs/references/backend/allowlist/delete-allowlist-identifier.mdx b/docs/references/backend/allowlist/delete-allowlist-identifier.mdx index e9f7ea96f0..6191c73dc6 100644 --- a/docs/references/backend/allowlist/delete-allowlist-identifier.mdx +++ b/docs/references/backend/allowlist/delete-allowlist-identifier.mdx @@ -1,6 +1,6 @@ --- title: '`deleteAllowlistIdentifier()`' -description: Use Clerk's Backend SDK to delete an allowlist identifier. +description: Use Clerk's JS Backend SDK to delete an allowlist identifier. sdk: js-backend --- diff --git a/docs/references/backend/allowlist/get-allowlist-identifier-list.mdx b/docs/references/backend/allowlist/get-allowlist-identifier-list.mdx index e3527f7869..f035d99bae 100644 --- a/docs/references/backend/allowlist/get-allowlist-identifier-list.mdx +++ b/docs/references/backend/allowlist/get-allowlist-identifier-list.mdx @@ -1,6 +1,6 @@ --- title: '`getAllowlistIdentifierList()`' -description: Use Clerk's Backend SDK to retrieve a list of allowlist identifiers. +description: Use Clerk's JS Backend SDK to retrieve a list of allowlist identifiers. sdk: js-backend --- diff --git a/docs/references/backend/authenticate-request.mdx b/docs/references/backend/authenticate-request.mdx index 59fe6b38c6..937c5380e5 100644 --- a/docs/references/backend/authenticate-request.mdx +++ b/docs/references/backend/authenticate-request.mdx @@ -1,6 +1,6 @@ --- title: '`authenticateRequest()`' -description: Use Clerk's Backend SDK to verify a token passed from the frontend. +description: Use Clerk's JS Backend SDK to verify a token passed from the frontend. sdk: js-backend --- @@ -109,7 +109,7 @@ It is recommended to set these options as [environment variables](/docs/guides/d ## Examples - + If you are using the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) on its own, you need to provide the `secretKey` and `publishableKey` to `createClerkClient()` so that it is passed to `authenticateRequest()`. You can set these values as [environment variables](/docs/guides/development/clerk-environment-variables#clerk-publishable-and-secret-keys) and then pass them to the function. @@ -193,6 +193,6 @@ export async function GET(request: Request) { {/* Note: this example is duped from /authenticate-request. Probably a good opportunity to use a partial here */} -The following example uses the `authenticateRequest()` method with the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) to verify the token passed by the frontend, and performs a networkless authentication by passing `jwtKey`. This will verify if the user is signed into the application or not. +The following example uses the `authenticateRequest()` method with the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) to verify the token passed by the frontend, and performs a networkless authentication by passing `jwtKey`. This will verify if the user is signed into the application or not. diff --git a/docs/references/backend/billing/cancel-subscription-item.mdx b/docs/references/backend/billing/cancel-subscription-item.mdx index 4036fc44e5..01baba6a1f 100644 --- a/docs/references/backend/billing/cancel-subscription-item.mdx +++ b/docs/references/backend/billing/cancel-subscription-item.mdx @@ -1,6 +1,6 @@ --- title: '`cancelSubscriptionItem()`' -description: Use Clerk's Backend SDK to cancel a subscription item. +description: Use Clerk's JS Backend SDK to cancel a subscription item. sdk: js-backend --- diff --git a/docs/references/backend/billing/get-organization-billing-subscription.mdx b/docs/references/backend/billing/get-organization-billing-subscription.mdx index 9fb402b632..a2a17c0acd 100644 --- a/docs/references/backend/billing/get-organization-billing-subscription.mdx +++ b/docs/references/backend/billing/get-organization-billing-subscription.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationBillingSubscription()`' -description: Use Clerk's Backend SDK to retrieve an organization's billing subscription. +description: Use Clerk's JS Backend SDK to retrieve an organization's billing subscription. sdk: js-backend --- diff --git a/docs/references/backend/billing/get-plan-list.mdx b/docs/references/backend/billing/get-plan-list.mdx index f0348f2001..bfede895e7 100644 --- a/docs/references/backend/billing/get-plan-list.mdx +++ b/docs/references/backend/billing/get-plan-list.mdx @@ -1,6 +1,6 @@ --- title: '`getPlanList()`' -description: Use Clerk's Backend SDK to retrieve a list of billing plans. +description: Use Clerk's JS Backend SDK to retrieve a list of billing plans. sdk: js-backend --- diff --git a/docs/references/backend/billing/get-user-billing-subscription.mdx b/docs/references/backend/billing/get-user-billing-subscription.mdx index d97e6768d8..dda986843e 100644 --- a/docs/references/backend/billing/get-user-billing-subscription.mdx +++ b/docs/references/backend/billing/get-user-billing-subscription.mdx @@ -1,6 +1,6 @@ --- title: '`getUserBillingSubscription()`' -description: Use Clerk's Backend SDK to retrieve a user's billing subscription. +description: Use Clerk's JS Backend SDK to retrieve a user's billing subscription. sdk: js-backend --- diff --git a/docs/references/backend/client/get-client.mdx b/docs/references/backend/client/get-client.mdx index a12b2982aa..86b20f19b4 100644 --- a/docs/references/backend/client/get-client.mdx +++ b/docs/references/backend/client/get-client.mdx @@ -1,6 +1,6 @@ --- title: '`getClient()`' -description: Use Clerk's Backend SDK to retrieve a single client by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single client by its ID. sdk: js-backend --- diff --git a/docs/references/backend/client/verify-client.mdx b/docs/references/backend/client/verify-client.mdx index 30327f5741..69cf21d331 100644 --- a/docs/references/backend/client/verify-client.mdx +++ b/docs/references/backend/client/verify-client.mdx @@ -1,6 +1,6 @@ --- title: '`verifyClient()`' -description: Use Clerk's Backend SDK to retrieve a client for a given session token, if the session is active. +description: Use Clerk's JS Backend SDK to retrieve a client for a given session token, if the session is active. sdk: js-backend --- diff --git a/docs/references/backend/domains/delete-domain.mdx b/docs/references/backend/domains/delete-domain.mdx index d40c117fab..83a5b26520 100644 --- a/docs/references/backend/domains/delete-domain.mdx +++ b/docs/references/backend/domains/delete-domain.mdx @@ -1,6 +1,6 @@ --- title: '`deleteDomain()`' -description: Use Clerk's Backend SDK to delete a satellite domain for the instance. +description: Use Clerk's JS Backend SDK to delete a satellite domain for the instance. sdk: js-backend --- diff --git a/docs/references/backend/email-addresses/create-email-address.mdx b/docs/references/backend/email-addresses/create-email-address.mdx index 1fc754118d..d6c9b73ecc 100644 --- a/docs/references/backend/email-addresses/create-email-address.mdx +++ b/docs/references/backend/email-addresses/create-email-address.mdx @@ -1,6 +1,6 @@ --- title: '`createEmailAddress()`' -description: Use Clerk's Backend SDK to create an email address for the specified user. +description: Use Clerk's JS Backend SDK to create an email address for the specified user. sdk: js-backend --- diff --git a/docs/references/backend/email-addresses/delete-email-address.mdx b/docs/references/backend/email-addresses/delete-email-address.mdx index 81e06faa3d..15caf4427e 100644 --- a/docs/references/backend/email-addresses/delete-email-address.mdx +++ b/docs/references/backend/email-addresses/delete-email-address.mdx @@ -1,6 +1,6 @@ --- title: '`deleteEmailAddress()`' -description: Use Clerk's Backend SDK to delete an email address. +description: Use Clerk's JS Backend SDK to delete an email address. sdk: js-backend --- diff --git a/docs/references/backend/email-addresses/get-email-address.mdx b/docs/references/backend/email-addresses/get-email-address.mdx index 983ff1933b..6371d676aa 100644 --- a/docs/references/backend/email-addresses/get-email-address.mdx +++ b/docs/references/backend/email-addresses/get-email-address.mdx @@ -1,6 +1,6 @@ --- title: '`getEmailAddress()`' -description: Use Clerk's Backend SDK to retrieve a single email address by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single email address by its ID. sdk: js-backend --- diff --git a/docs/references/backend/email-addresses/update-email-address.mdx b/docs/references/backend/email-addresses/update-email-address.mdx index 8370a14e08..d28790acae 100644 --- a/docs/references/backend/email-addresses/update-email-address.mdx +++ b/docs/references/backend/email-addresses/update-email-address.mdx @@ -1,6 +1,6 @@ --- title: '`updateEmailAddress()`' -description: Use Clerk's Backend SDK to update an email address. +description: Use Clerk's JS Backend SDK to update an email address. sdk: js-backend --- diff --git a/docs/references/backend/invitations/create-invitation.mdx b/docs/references/backend/invitations/create-invitation.mdx index a5bf7d21ea..855e206ea9 100644 --- a/docs/references/backend/invitations/create-invitation.mdx +++ b/docs/references/backend/invitations/create-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`createInvitation()`' -description: Use Clerk's Backend SDK to create a new invitation for the given email address, and send the invitation email. +description: Use Clerk's JS Backend SDK to create a new invitation for the given email address, and send the invitation email. sdk: js-backend --- diff --git a/docs/references/backend/invitations/get-invitation-list.mdx b/docs/references/backend/invitations/get-invitation-list.mdx index 1b6226d99c..18d20cd675 100644 --- a/docs/references/backend/invitations/get-invitation-list.mdx +++ b/docs/references/backend/invitations/get-invitation-list.mdx @@ -1,6 +1,6 @@ --- title: '`getInvitationList()`' -description: Use Clerk's Backend SDK to retrieve a list of non-revoked invitations for your application. +description: Use Clerk's JS Backend SDK to retrieve a list of non-revoked invitations for your application. sdk: js-backend --- diff --git a/docs/references/backend/invitations/revoke-invitation.mdx b/docs/references/backend/invitations/revoke-invitation.mdx index 2bbcbbaa99..23f83afbf2 100644 --- a/docs/references/backend/invitations/revoke-invitation.mdx +++ b/docs/references/backend/invitations/revoke-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`revokeInvitation()`' -description: Use Clerk's Backend SDK to revoke an invitation. +description: Use Clerk's JS Backend SDK to revoke an invitation. sdk: js-backend --- diff --git a/docs/references/backend/m2m-tokens/create-token.mdx b/docs/references/backend/m2m-tokens/create-token.mdx index d713a89543..2bf128b1ba 100644 --- a/docs/references/backend/m2m-tokens/create-token.mdx +++ b/docs/references/backend/m2m-tokens/create-token.mdx @@ -1,6 +1,6 @@ --- title: '`createToken()`' -description: Use Clerk's Backend SDK to create a M2M token. +description: Use Clerk's JS Backend SDK to create a M2M token. sdk: js-backend --- diff --git a/docs/references/backend/m2m-tokens/revoke-token.mdx b/docs/references/backend/m2m-tokens/revoke-token.mdx index 6b670d61ed..cfc7446f02 100644 --- a/docs/references/backend/m2m-tokens/revoke-token.mdx +++ b/docs/references/backend/m2m-tokens/revoke-token.mdx @@ -1,6 +1,6 @@ --- title: '`revokeToken()`' -description: Use Clerk's Backend SDK to revoke a M2M token. +description: Use Clerk's JS Backend SDK to revoke a M2M token. sdk: js-backend --- diff --git a/docs/references/backend/m2m-tokens/verify-token.mdx b/docs/references/backend/m2m-tokens/verify-token.mdx index c92dea364f..c7657049b2 100644 --- a/docs/references/backend/m2m-tokens/verify-token.mdx +++ b/docs/references/backend/m2m-tokens/verify-token.mdx @@ -1,6 +1,6 @@ --- title: '`verifyToken()`' -description: Use Clerk's Backend SDK to verify a M2M token. +description: Use Clerk's JS Backend SDK to verify a M2M token. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/create.mdx b/docs/references/backend/oauth-applications/create.mdx index a31e7fa389..a4de1715cc 100644 --- a/docs/references/backend/oauth-applications/create.mdx +++ b/docs/references/backend/oauth-applications/create.mdx @@ -1,6 +1,6 @@ --- title: '`create()`' -description: Use Clerk's Backend SDK to create an OAuth application. +description: Use Clerk's JS Backend SDK to create an OAuth application. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/delete.mdx b/docs/references/backend/oauth-applications/delete.mdx index 3e718d9be0..a3c44c5f0e 100644 --- a/docs/references/backend/oauth-applications/delete.mdx +++ b/docs/references/backend/oauth-applications/delete.mdx @@ -1,6 +1,6 @@ --- title: '`delete()`' -description: Use Clerk's Backend SDK to delete an OAuth application. +description: Use Clerk's JS Backend SDK to delete an OAuth application. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/get.mdx b/docs/references/backend/oauth-applications/get.mdx index 7c56f9d235..6c323d09b0 100644 --- a/docs/references/backend/oauth-applications/get.mdx +++ b/docs/references/backend/oauth-applications/get.mdx @@ -1,6 +1,6 @@ --- title: '`get()`' -description: Use Clerk's Backend SDK to retrieve an OAuth application. +description: Use Clerk's JS Backend SDK to retrieve an OAuth application. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/list.mdx b/docs/references/backend/oauth-applications/list.mdx index aa5e76c6c3..6e0ba191ac 100644 --- a/docs/references/backend/oauth-applications/list.mdx +++ b/docs/references/backend/oauth-applications/list.mdx @@ -1,6 +1,6 @@ --- title: '`list()`' -description: Use Clerk's Backend SDK to retrieve a list of OAuth applications for an instance. +description: Use Clerk's JS Backend SDK to retrieve a list of OAuth applications for an instance. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/rotate-secret.mdx b/docs/references/backend/oauth-applications/rotate-secret.mdx index 49902a2d34..94499fc340 100644 --- a/docs/references/backend/oauth-applications/rotate-secret.mdx +++ b/docs/references/backend/oauth-applications/rotate-secret.mdx @@ -1,6 +1,6 @@ --- title: '`rotateSecret()`' -description: Use Clerk's Backend SDK to rotate the OAuth application's client secret. +description: Use Clerk's JS Backend SDK to rotate the OAuth application's client secret. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/update.mdx b/docs/references/backend/oauth-applications/update.mdx index b18338e519..93695362fe 100644 --- a/docs/references/backend/oauth-applications/update.mdx +++ b/docs/references/backend/oauth-applications/update.mdx @@ -1,6 +1,6 @@ --- title: '`update()`' -description: Use Clerk's Backend SDK to update an OAuth application. +description: Use Clerk's JS Backend SDK to update an OAuth application. sdk: js-backend --- diff --git a/docs/references/backend/organization/create-organization-invitation-bulk.mdx b/docs/references/backend/organization/create-organization-invitation-bulk.mdx index c5a4f00c96..e7d33229c0 100644 --- a/docs/references/backend/organization/create-organization-invitation-bulk.mdx +++ b/docs/references/backend/organization/create-organization-invitation-bulk.mdx @@ -1,6 +1,6 @@ --- title: '`createOrganizationInvitationBulk()`' -description: Use Clerk's Backend SDK to create multiple invitations for new users to join an organization. +description: Use Clerk's JS Backend SDK to create multiple invitations for new users to join an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/create-organization-invitation.mdx b/docs/references/backend/organization/create-organization-invitation.mdx index 9a2b129ff5..3f577e6b2e 100644 --- a/docs/references/backend/organization/create-organization-invitation.mdx +++ b/docs/references/backend/organization/create-organization-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`createOrganizationInvitation()`' -description: Use Clerk's Backend SDK to create an invitation for new users to join an organization. +description: Use Clerk's JS Backend SDK to create an invitation for new users to join an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/create-organization-membership.mdx b/docs/references/backend/organization/create-organization-membership.mdx index 8faa6e99b7..36093c87e0 100644 --- a/docs/references/backend/organization/create-organization-membership.mdx +++ b/docs/references/backend/organization/create-organization-membership.mdx @@ -1,6 +1,6 @@ --- title: '`createOrganizationMembership()`' -description: Use Clerk's Backend SDK to create a membership to an organization for a user directly (circumventing the need for an invitation). +description: Use Clerk's JS Backend SDK to create a membership to an organization for a user directly (circumventing the need for an invitation). sdk: js-backend --- diff --git a/docs/references/backend/organization/create-organization.mdx b/docs/references/backend/organization/create-organization.mdx index cf77e70164..14918c0dfc 100644 --- a/docs/references/backend/organization/create-organization.mdx +++ b/docs/references/backend/organization/create-organization.mdx @@ -1,6 +1,6 @@ --- title: '`createOrganization()`' -description: Use Clerk's Backend SDK to create an organization. +description: Use Clerk's JS Backend SDK to create an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/delete-organization-logo.mdx b/docs/references/backend/organization/delete-organization-logo.mdx index 73860476eb..5e4c36089f 100644 --- a/docs/references/backend/organization/delete-organization-logo.mdx +++ b/docs/references/backend/organization/delete-organization-logo.mdx @@ -1,6 +1,6 @@ --- title: '`deleteOrganizationLogo()`' -description: Use Clerk's Backend SDK to delete an organization's logo. +description: Use Clerk's JS Backend SDK to delete an organization's logo. sdk: js-backend --- diff --git a/docs/references/backend/organization/delete-organization-membership.mdx b/docs/references/backend/organization/delete-organization-membership.mdx index 594871279a..a6a5801a16 100644 --- a/docs/references/backend/organization/delete-organization-membership.mdx +++ b/docs/references/backend/organization/delete-organization-membership.mdx @@ -1,6 +1,6 @@ --- title: '`deleteOrganizationMembership()`' -description: Use Clerk's Backend SDK to remove a user from the specified organization. +description: Use Clerk's JS Backend SDK to remove a user from the specified organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/delete-organization.mdx b/docs/references/backend/organization/delete-organization.mdx index 3655efbe6c..ff25a47973 100644 --- a/docs/references/backend/organization/delete-organization.mdx +++ b/docs/references/backend/organization/delete-organization.mdx @@ -1,6 +1,6 @@ --- title: '`deleteOrganization()`' -description: Use Clerk's Backend SDK to delete an organization. +description: Use Clerk's JS Backend SDK to delete an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization-invitation-list.mdx b/docs/references/backend/organization/get-organization-invitation-list.mdx index 3e55cf7fe4..97fcef3dd4 100644 --- a/docs/references/backend/organization/get-organization-invitation-list.mdx +++ b/docs/references/backend/organization/get-organization-invitation-list.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationInvitationList()`' -description: Use Clerk's Backend SDK to retrieve a list of organization invitations. +description: Use Clerk's JS Backend SDK to retrieve a list of organization invitations. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization-invitation.mdx b/docs/references/backend/organization/get-organization-invitation.mdx index 907bb4dad6..f8106032a3 100644 --- a/docs/references/backend/organization/get-organization-invitation.mdx +++ b/docs/references/backend/organization/get-organization-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationInvitation()`' -description: Use Clerk's Backend SDK to retrieve an organization invitation. +description: Use Clerk's JS Backend SDK to retrieve an organization invitation. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization-list.mdx b/docs/references/backend/organization/get-organization-list.mdx index 36e90acf1a..9454845977 100644 --- a/docs/references/backend/organization/get-organization-list.mdx +++ b/docs/references/backend/organization/get-organization-list.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationList()`' -description: Use Clerk's Backend SDK to retrieve a list of organizations. +description: Use Clerk's JS Backend SDK to retrieve a list of organizations. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization-membership-list.mdx b/docs/references/backend/organization/get-organization-membership-list.mdx index e74680b065..0900a26842 100644 --- a/docs/references/backend/organization/get-organization-membership-list.mdx +++ b/docs/references/backend/organization/get-organization-membership-list.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationMembershipList()`' -description: Use Clerk's Backend SDK to retrieve a list of memberships for an organization. +description: Use Clerk's JS Backend SDK to retrieve a list of memberships for an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization.mdx b/docs/references/backend/organization/get-organization.mdx index 7a4e695605..fcc64ee6f2 100644 --- a/docs/references/backend/organization/get-organization.mdx +++ b/docs/references/backend/organization/get-organization.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganization()`' -description: Use Clerk's Backend SDK to retrieve a single organization. +description: Use Clerk's JS Backend SDK to retrieve a single organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/revoke-organization-invitation.mdx b/docs/references/backend/organization/revoke-organization-invitation.mdx index c4684c38da..c02855b307 100644 --- a/docs/references/backend/organization/revoke-organization-invitation.mdx +++ b/docs/references/backend/organization/revoke-organization-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`revokeOrganizationInvitation()`' -description: Use Clerk's Backend SDK to revoke an organization invitation from a user for a specified organization. +description: Use Clerk's JS Backend SDK to revoke an organization invitation from a user for a specified organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/update-organization-logo.mdx b/docs/references/backend/organization/update-organization-logo.mdx index 68b9c62801..d183e72fed 100644 --- a/docs/references/backend/organization/update-organization-logo.mdx +++ b/docs/references/backend/organization/update-organization-logo.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganizationLogo()`' -description: Use Clerk's Backend SDK to update an organization's logo. +description: Use Clerk's JS Backend SDK to update an organization's logo. sdk: js-backend --- diff --git a/docs/references/backend/organization/update-organization-membership-metadata.mdx b/docs/references/backend/organization/update-organization-membership-metadata.mdx index e4c8188e13..e452b02684 100644 --- a/docs/references/backend/organization/update-organization-membership-metadata.mdx +++ b/docs/references/backend/organization/update-organization-membership-metadata.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganizationMembershipMetadata()`' -description: Use Clerk's Backend SDK to update the metadata associated with a user's organization membership. +description: Use Clerk's JS Backend SDK to update the metadata associated with a user's organization membership. sdk: js-backend --- diff --git a/docs/references/backend/organization/update-organization-membership.mdx b/docs/references/backend/organization/update-organization-membership.mdx index 208aaef231..6de95ea731 100644 --- a/docs/references/backend/organization/update-organization-membership.mdx +++ b/docs/references/backend/organization/update-organization-membership.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganizationMembership()`' -description: Use Clerk's Backend SDK to update a user's organization membership. +description: Use Clerk's JS Backend SDK to update a user's organization membership. sdk: js-backend --- diff --git a/docs/references/backend/organization/update-organization-metadata.mdx b/docs/references/backend/organization/update-organization-metadata.mdx index 9440e82f72..d8a12dfb6c 100644 --- a/docs/references/backend/organization/update-organization-metadata.mdx +++ b/docs/references/backend/organization/update-organization-metadata.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganizationMetadata()`' -description: Use Clerk's Backend SDK to update the metadata associated with a given organization. +description: Use Clerk's JS Backend SDK to update the metadata associated with a given organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/update-organization.mdx b/docs/references/backend/organization/update-organization.mdx index 70acc0564c..7c5e592faf 100644 --- a/docs/references/backend/organization/update-organization.mdx +++ b/docs/references/backend/organization/update-organization.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganization()`' -description: Use Clerk's Backend SDK to update an organization's name. +description: Use Clerk's JS Backend SDK to update an organization's name. sdk: js-backend --- diff --git a/docs/references/backend/overview.mdx b/docs/references/backend/overview.mdx index e6f791983c..db0192d63f 100644 --- a/docs/references/backend/overview.mdx +++ b/docs/references/backend/overview.mdx @@ -89,7 +89,7 @@ The **OAuth Application** resource allows you to create and manage OAuth applica ## Authentication utilities -In addition to the resources listed above, the JavaScript Backend SDK also provides low-level authentication utilities that can be used to verify Clerk-generated tokens and authenticate requests from your frontend: +In addition to the resources listed above, the JS Backend SDK also provides low-level authentication utilities that can be used to verify Clerk-generated tokens and authenticate requests from your frontend: - [`authenticateRequest()`](/docs/references/backend/authenticate-request): Authenticates a token passed from the frontend. - [`verifyToken()`](/docs/references/backend/verify-token): Verifies a Clerk-generated token signature. diff --git a/docs/references/backend/phone-numbers/create-phone-number.mdx b/docs/references/backend/phone-numbers/create-phone-number.mdx index f45174eaa2..970c214bc1 100644 --- a/docs/references/backend/phone-numbers/create-phone-number.mdx +++ b/docs/references/backend/phone-numbers/create-phone-number.mdx @@ -1,6 +1,6 @@ --- title: '`createPhoneNumber()`' -description: Use Clerk's Backend SDK to create a phone number for the specified user. +description: Use Clerk's JS Backend SDK to create a phone number for the specified user. sdk: js-backend --- diff --git a/docs/references/backend/phone-numbers/delete-phone-number.mdx b/docs/references/backend/phone-numbers/delete-phone-number.mdx index 3eeabc0f9b..d6fd2c4f25 100644 --- a/docs/references/backend/phone-numbers/delete-phone-number.mdx +++ b/docs/references/backend/phone-numbers/delete-phone-number.mdx @@ -1,6 +1,6 @@ --- title: '`deletePhoneNumber()`' -description: Use Clerk's Backend SDK to delete a phone number. +description: Use Clerk's JS Backend SDK to delete a phone number. sdk: js-backend --- diff --git a/docs/references/backend/phone-numbers/get-phone-number.mdx b/docs/references/backend/phone-numbers/get-phone-number.mdx index 12b51d953e..bc6668757b 100644 --- a/docs/references/backend/phone-numbers/get-phone-number.mdx +++ b/docs/references/backend/phone-numbers/get-phone-number.mdx @@ -1,6 +1,6 @@ --- title: '`getPhoneNumber()`' -description: Use Clerk's Backend SDK to retrieve a single phone number by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single phone number by its ID. sdk: js-backend --- diff --git a/docs/references/backend/phone-numbers/update-phone-number.mdx b/docs/references/backend/phone-numbers/update-phone-number.mdx index 5b7fafb0e6..df8a1ef07a 100644 --- a/docs/references/backend/phone-numbers/update-phone-number.mdx +++ b/docs/references/backend/phone-numbers/update-phone-number.mdx @@ -1,6 +1,6 @@ --- title: '`updatePhoneNumber()`' -description: Use Clerk's Backend SDK to update a phone number. +description: Use Clerk's JS Backend SDK to update a phone number. sdk: js-backend --- diff --git a/docs/references/backend/redirect-urls/create-redirect-url.mdx b/docs/references/backend/redirect-urls/create-redirect-url.mdx index 40faf34664..365c97a242 100644 --- a/docs/references/backend/redirect-urls/create-redirect-url.mdx +++ b/docs/references/backend/redirect-urls/create-redirect-url.mdx @@ -1,6 +1,6 @@ --- title: '`createRedirectUrl()`' -description: Use Clerk's Backend SDK to create a redirect URL. +description: Use Clerk's JS Backend SDK to create a redirect URL. sdk: js-backend --- diff --git a/docs/references/backend/redirect-urls/delete-redirect-url.mdx b/docs/references/backend/redirect-urls/delete-redirect-url.mdx index 373b812555..2766ac7ff4 100644 --- a/docs/references/backend/redirect-urls/delete-redirect-url.mdx +++ b/docs/references/backend/redirect-urls/delete-redirect-url.mdx @@ -1,6 +1,6 @@ --- title: '`deleteRedirectUrl()`' -description: Use Clerk's Backend SDK to delete a redirect URL. +description: Use Clerk's JS Backend SDK to delete a redirect URL. sdk: js-backend --- diff --git a/docs/references/backend/redirect-urls/get-redirect-url-list.mdx b/docs/references/backend/redirect-urls/get-redirect-url-list.mdx index 5c6d5ce816..e3e7dd18f6 100644 --- a/docs/references/backend/redirect-urls/get-redirect-url-list.mdx +++ b/docs/references/backend/redirect-urls/get-redirect-url-list.mdx @@ -1,6 +1,6 @@ --- title: '`getRedirectUrlList()`' -description: Use Clerk's Backend SDK to retrieve a list of white-listed redirect URLs. +description: Use Clerk's JS Backend SDK to retrieve a list of white-listed redirect URLs. sdk: js-backend --- diff --git a/docs/references/backend/redirect-urls/get-redirect-url.mdx b/docs/references/backend/redirect-urls/get-redirect-url.mdx index f1f9914b5c..5744fa65cf 100644 --- a/docs/references/backend/redirect-urls/get-redirect-url.mdx +++ b/docs/references/backend/redirect-urls/get-redirect-url.mdx @@ -1,6 +1,6 @@ --- title: '`getRedirectUrl()`' -description: Use Clerk's Backend SDK to retrieve a single redirect URL by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single redirect URL by its ID. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/create-saml-connection.mdx b/docs/references/backend/saml-connections/create-saml-connection.mdx index 0c098e5782..defb5e7e94 100644 --- a/docs/references/backend/saml-connections/create-saml-connection.mdx +++ b/docs/references/backend/saml-connections/create-saml-connection.mdx @@ -1,6 +1,6 @@ --- title: '`createSamlConnection()`' -description: Use Clerk's Backend SDK to create a SAML connection. +description: Use Clerk's JS Backend SDK to create a SAML connection. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/delete-saml-connection.mdx b/docs/references/backend/saml-connections/delete-saml-connection.mdx index c3c75a0996..460fcf758d 100644 --- a/docs/references/backend/saml-connections/delete-saml-connection.mdx +++ b/docs/references/backend/saml-connections/delete-saml-connection.mdx @@ -1,6 +1,6 @@ --- title: '`deleteSamlConnection()`' -description: Use Clerk's Backend SDK to delete a SAML connection. +description: Use Clerk's JS Backend SDK to delete a SAML connection. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/get-saml-connection-list.mdx b/docs/references/backend/saml-connections/get-saml-connection-list.mdx index 3da0c31f86..33a5aeeaf0 100644 --- a/docs/references/backend/saml-connections/get-saml-connection-list.mdx +++ b/docs/references/backend/saml-connections/get-saml-connection-list.mdx @@ -1,6 +1,6 @@ --- title: '`getSamlConnectionList()`' -description: Use Clerk's Backend SDK to retrieve the list of SAML connections for an instance. +description: Use Clerk's JS Backend SDK to retrieve the list of SAML connections for an instance. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/get-saml-connection.mdx b/docs/references/backend/saml-connections/get-saml-connection.mdx index 43f10b3e37..0516d5fef3 100644 --- a/docs/references/backend/saml-connections/get-saml-connection.mdx +++ b/docs/references/backend/saml-connections/get-saml-connection.mdx @@ -1,6 +1,6 @@ --- title: '`getSamlConnection()`' -description: Use Clerk's Backend SDK to retrieve a SAML connection. +description: Use Clerk's JS Backend SDK to retrieve a SAML connection. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/update-saml-connection.mdx b/docs/references/backend/saml-connections/update-saml-connection.mdx index c2e08e81fe..90d7734297 100644 --- a/docs/references/backend/saml-connections/update-saml-connection.mdx +++ b/docs/references/backend/saml-connections/update-saml-connection.mdx @@ -1,6 +1,6 @@ --- title: '`updateSamlConnection()`' -description: Use Clerk's Backend SDK to update a SAML connection. +description: Use Clerk's JS Backend SDK to update a SAML connection. sdk: js-backend --- diff --git a/docs/references/backend/sessions/get-session-list.mdx b/docs/references/backend/sessions/get-session-list.mdx index 04a3bf24fc..b504ce928b 100644 --- a/docs/references/backend/sessions/get-session-list.mdx +++ b/docs/references/backend/sessions/get-session-list.mdx @@ -1,6 +1,6 @@ --- title: '`getSessionList()`' -description: Use Clerk's Backend SDK to retrieve a list of sessions. +description: Use Clerk's JS Backend SDK to retrieve a list of sessions. sdk: js-backend --- diff --git a/docs/references/backend/sessions/get-session.mdx b/docs/references/backend/sessions/get-session.mdx index a2a19d5ec6..8b8c50b823 100644 --- a/docs/references/backend/sessions/get-session.mdx +++ b/docs/references/backend/sessions/get-session.mdx @@ -1,6 +1,6 @@ --- title: '`getSession()`' -description: Use Clerk's Backend SDK to retrieve a single session by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single session by its ID. sdk: js-backend --- diff --git a/docs/references/backend/sessions/get-token.mdx b/docs/references/backend/sessions/get-token.mdx index 7c7a8955fb..06c64bde02 100644 --- a/docs/references/backend/sessions/get-token.mdx +++ b/docs/references/backend/sessions/get-token.mdx @@ -1,6 +1,6 @@ --- title: '`getToken()`' -description: Use Clerk's Backend SDK to retrieve a token for a JWT template that is defined in the Clerk Dashboard. +description: Use Clerk's JS Backend SDK to retrieve a token for a JWT template that is defined in the Clerk Dashboard. sdk: js-backend --- @@ -46,7 +46,7 @@ The following examples demonstrate how to use `getToken()` with different framew 1. Gets the current session ID using framework-specific auth helpers. 1. Checks if there's an active session. -1. Uses the Backend SDK's `getToken()` method to generate a token from a template. +1. Uses the JS Backend SDK's `getToken()` method to generate a token from a template. 1. Returns the token in the response. The token resembles the following: diff --git a/docs/references/backend/sessions/revoke-session.mdx b/docs/references/backend/sessions/revoke-session.mdx index f7f0facc62..c29e79bf2d 100644 --- a/docs/references/backend/sessions/revoke-session.mdx +++ b/docs/references/backend/sessions/revoke-session.mdx @@ -1,6 +1,6 @@ --- title: '`revokeSession()`' -description: Use Clerk's Backend SDK to revoke a session given its ID. +description: Use Clerk's JS Backend SDK to revoke a session given its ID. sdk: js-backend --- diff --git a/docs/references/backend/sessions/verify-session.mdx b/docs/references/backend/sessions/verify-session.mdx index 7e49a77990..60b60a4378 100644 --- a/docs/references/backend/sessions/verify-session.mdx +++ b/docs/references/backend/sessions/verify-session.mdx @@ -1,6 +1,6 @@ --- title: '`verifySession()` (deprecated)' -description: Use Clerk's Backend SDK to to verify whether a session with a given ID corresponds to the provided session token. +description: Use Clerk's JS Backend SDK to to verify whether a session with a given ID corresponds to the provided session token. sdk: js-backend --- diff --git a/docs/references/backend/sign-in-tokens/create-sign-in-token.mdx b/docs/references/backend/sign-in-tokens/create-sign-in-token.mdx index a24e1a2760..ba5ca2968d 100644 --- a/docs/references/backend/sign-in-tokens/create-sign-in-token.mdx +++ b/docs/references/backend/sign-in-tokens/create-sign-in-token.mdx @@ -1,6 +1,6 @@ --- title: '`createSignInToken()`' -description: Use Clerk's Backend SDK to create a new sign-in token for a given user. +description: Use Clerk's JS Backend SDK to create a new sign-in token for a given user. sdk: js-backend --- diff --git a/docs/references/backend/sign-in-tokens/revoke-sign-in-token.mdx b/docs/references/backend/sign-in-tokens/revoke-sign-in-token.mdx index d1a965668b..8e2667e99e 100644 --- a/docs/references/backend/sign-in-tokens/revoke-sign-in-token.mdx +++ b/docs/references/backend/sign-in-tokens/revoke-sign-in-token.mdx @@ -1,6 +1,6 @@ --- title: '`revokeSignInToken()`' -description: Use Clerk's Backend SDK to revoke a pending sign-in token. +description: Use Clerk's JS Backend SDK to revoke a pending sign-in token. sdk: js-backend --- diff --git a/docs/references/backend/testing-tokens/create-testing-token.mdx b/docs/references/backend/testing-tokens/create-testing-token.mdx index 4ed225b198..92df481249 100644 --- a/docs/references/backend/testing-tokens/create-testing-token.mdx +++ b/docs/references/backend/testing-tokens/create-testing-token.mdx @@ -1,6 +1,6 @@ --- title: '`createTestingToken()`' -description: Use Clerk's Backend SDK to create a testing token for the instance. +description: Use Clerk's JS Backend SDK to create a testing token for the instance. sdk: js-backend --- diff --git a/docs/references/backend/user/ban-user.mdx b/docs/references/backend/user/ban-user.mdx index 72631f5db7..b909707ae1 100644 --- a/docs/references/backend/user/ban-user.mdx +++ b/docs/references/backend/user/ban-user.mdx @@ -1,6 +1,6 @@ --- title: '`banUser()`' -description: Use Clerk's Backend SDK to mark a given user as banned. +description: Use Clerk's JS Backend SDK to mark a given user as banned. sdk: js-backend --- diff --git a/docs/references/backend/user/create-user.mdx b/docs/references/backend/user/create-user.mdx index 1bf0619fc4..a2ba05efc6 100644 --- a/docs/references/backend/user/create-user.mdx +++ b/docs/references/backend/user/create-user.mdx @@ -1,6 +1,6 @@ --- title: '`createUser()`' -description: Use Clerk's Backend SDK to create a user. +description: Use Clerk's JS Backend SDK to create a user. sdk: js-backend --- diff --git a/docs/references/backend/user/delete-user-profile-image.mdx b/docs/references/backend/user/delete-user-profile-image.mdx index 9f700fbac0..12bb6dfe17 100644 --- a/docs/references/backend/user/delete-user-profile-image.mdx +++ b/docs/references/backend/user/delete-user-profile-image.mdx @@ -1,6 +1,6 @@ --- title: '`deleteUserProfileImage()`' -description: Use Clerk's Backend SDK to delete a user's profile image. +description: Use Clerk's JS Backend SDK to delete a user's profile image. sdk: js-backend --- @@ -17,7 +17,7 @@ function deleteUserProfileImage(userId: string): Promise > [!WARNING] -> Using Backend SDK methods can contribute towards rate limiting. To remove a user's profile image, it's recommended to use the frontend [`user.setProfileImage({ file: null })`](/docs/references/javascript/user#set-profile-image-params) method instead. +> Using JS Backend SDK methods can contribute towards rate limiting. To remove a user's profile image, it's recommended to use the frontend [`user.setProfileImage({ file: null })`](/docs/references/javascript/user#set-profile-image-params) method instead. ```tsx const userId = 'user_123' diff --git a/docs/references/backend/user/delete-user.mdx b/docs/references/backend/user/delete-user.mdx index 724903da55..48dcdfee60 100644 --- a/docs/references/backend/user/delete-user.mdx +++ b/docs/references/backend/user/delete-user.mdx @@ -1,6 +1,6 @@ --- title: '`deleteUser()`' -description: Use Clerk's Backend SDK to delete a user. +description: Use Clerk's JS Backend SDK to delete a user. sdk: js-backend --- diff --git a/docs/references/backend/user/disable-user-mfa.mdx b/docs/references/backend/user/disable-user-mfa.mdx index ed7e644962..1117efd60d 100644 --- a/docs/references/backend/user/disable-user-mfa.mdx +++ b/docs/references/backend/user/disable-user-mfa.mdx @@ -1,6 +1,6 @@ --- title: '`disableUserMFA()`' -description: Use Clerk's Backend SDK to disable all of a user's MFA methods at once. +description: Use Clerk's JS Backend SDK to disable all of a user's MFA methods at once. sdk: js-backend --- diff --git a/docs/references/backend/user/get-count.mdx b/docs/references/backend/user/get-count.mdx index 42e6cb9ad2..7bd0dedb9e 100644 --- a/docs/references/backend/user/get-count.mdx +++ b/docs/references/backend/user/get-count.mdx @@ -1,6 +1,6 @@ --- title: '`getCount()`' -description: Use Clerk's Backend SDK to retrieve the total number of users. +description: Use Clerk's JS Backend SDK to retrieve the total number of users. sdk: js-backend --- diff --git a/docs/references/backend/user/get-organization-membership-list.mdx b/docs/references/backend/user/get-organization-membership-list.mdx index a94e2aa175..47f83c0621 100644 --- a/docs/references/backend/user/get-organization-membership-list.mdx +++ b/docs/references/backend/user/get-organization-membership-list.mdx @@ -1,6 +1,6 @@ --- title: getOrganizationMembershipList() -description: Use Clerk's Backend SDK to retrieve a list of organization memberships for a given user. +description: Use Clerk's JS Backend SDK to retrieve a list of organization memberships for a given user. sdk: js-backend --- diff --git a/docs/references/backend/user/get-user-list.mdx b/docs/references/backend/user/get-user-list.mdx index 9916955795..37af668617 100644 --- a/docs/references/backend/user/get-user-list.mdx +++ b/docs/references/backend/user/get-user-list.mdx @@ -1,6 +1,6 @@ --- title: '`getUserList()`' -description: Use Clerk's Backend SDK to retrieve a list of users. +description: Use Clerk's JS Backend SDK to retrieve a list of users. sdk: js-backend --- diff --git a/docs/references/backend/user/get-user-oauth-access-token.mdx b/docs/references/backend/user/get-user-oauth-access-token.mdx index c7cfe3e04c..b860d9a0fe 100644 --- a/docs/references/backend/user/get-user-oauth-access-token.mdx +++ b/docs/references/backend/user/get-user-oauth-access-token.mdx @@ -1,6 +1,6 @@ --- title: getUserOauthAccessToken() -description: Use Clerk's Backend SDK to retrieve the corresponding OAuth access token for a user. +description: Use Clerk's JS Backend SDK to retrieve the corresponding OAuth access token for a user. sdk: js-backend --- diff --git a/docs/references/backend/user/get-user.mdx b/docs/references/backend/user/get-user.mdx index 8bf31965c7..7bcacbdaf2 100644 --- a/docs/references/backend/user/get-user.mdx +++ b/docs/references/backend/user/get-user.mdx @@ -1,6 +1,6 @@ --- title: '`getUser()`' -description: Use Clerk's Backend SDK to retrieve a single user by their ID. +description: Use Clerk's JS Backend SDK to retrieve a single user by their ID. sdk: js-backend --- diff --git a/docs/references/backend/user/lock-user.mdx b/docs/references/backend/user/lock-user.mdx index 2767cfafc7..506fc7fd11 100644 --- a/docs/references/backend/user/lock-user.mdx +++ b/docs/references/backend/user/lock-user.mdx @@ -1,6 +1,6 @@ --- title: '`lockUser()`' -description: Use Clerk's Backend SDK to mark a user as locked, which means they are not allowed to sign in again until the lock expires. +description: Use Clerk's JS Backend SDK to mark a user as locked, which means they are not allowed to sign in again until the lock expires. sdk: js-backend --- diff --git a/docs/references/backend/user/unban-user.mdx b/docs/references/backend/user/unban-user.mdx index 306d8c2aea..b3ec0dffb7 100644 --- a/docs/references/backend/user/unban-user.mdx +++ b/docs/references/backend/user/unban-user.mdx @@ -1,6 +1,6 @@ --- title: '`unbanUser()`' -description: Use Clerk's Backend SDK to remove the ban mark from a user. +description: Use Clerk's JS Backend SDK to remove the ban mark from a user. sdk: js-backend --- diff --git a/docs/references/backend/user/unlock-user.mdx b/docs/references/backend/user/unlock-user.mdx index b8339243a3..96159eb71a 100644 --- a/docs/references/backend/user/unlock-user.mdx +++ b/docs/references/backend/user/unlock-user.mdx @@ -1,6 +1,6 @@ --- title: '`unlockUser()`' -description: Use Clerk's Backend SDK to remove a sign-in lock from a user. +description: Use Clerk's JS Backend SDK to remove a sign-in lock from a user. sdk: js-backend --- diff --git a/docs/references/backend/user/update-user-metadata.mdx b/docs/references/backend/user/update-user-metadata.mdx index 8fc7eb8fba..b9d065301e 100644 --- a/docs/references/backend/user/update-user-metadata.mdx +++ b/docs/references/backend/user/update-user-metadata.mdx @@ -1,6 +1,6 @@ --- title: '`updateUserMetadata()`' -description: Use Clerk's Backend SDK to update the metadata associated with the specified user. +description: Use Clerk's JS Backend SDK to update the metadata associated with the specified user. sdk: js-backend --- diff --git a/docs/references/backend/user/update-user-profile-image.mdx b/docs/references/backend/user/update-user-profile-image.mdx index 8be600a653..e50a969fbf 100644 --- a/docs/references/backend/user/update-user-profile-image.mdx +++ b/docs/references/backend/user/update-user-profile-image.mdx @@ -1,6 +1,6 @@ --- title: '`updateUserProfileImage()`' -description: Use Clerk's Backend SDK to update a user's profile image. +description: Use Clerk's JS Backend SDK to update a user's profile image. sdk: js-backend --- @@ -17,7 +17,7 @@ function updateUserProfileImage(userId: string, params: { file: Blob | File }): > [!WARNING] -> Using Backend SDK methods can contribute towards rate limiting. To set a user's profile image, it's recommended to use the frontend [`user.setProfileImage()`](/docs/references/javascript/user#set-profile-image) method instead. +> Using JS Backend SDK methods can contribute towards rate limiting. To set a user's profile image, it's recommended to use the frontend [`user.setProfileImage()`](/docs/references/javascript/user#set-profile-image) method instead. ```tsx const userId = 'user_123' diff --git a/docs/references/backend/user/update-user.mdx b/docs/references/backend/user/update-user.mdx index 7956f34d2e..5b141e4141 100644 --- a/docs/references/backend/user/update-user.mdx +++ b/docs/references/backend/user/update-user.mdx @@ -1,6 +1,6 @@ --- title: '`updateUser()`' -description: Use Clerk's Backend SDK to update a user. +description: Use Clerk's JS Backend SDK to update a user. sdk: js-backend --- diff --git a/docs/references/backend/user/verify-password.mdx b/docs/references/backend/user/verify-password.mdx index 7e58768c62..c48f7336cd 100644 --- a/docs/references/backend/user/verify-password.mdx +++ b/docs/references/backend/user/verify-password.mdx @@ -1,6 +1,6 @@ --- title: '`verifyPassword()`' -description: Use Clerk's Backend SDK to check that the user's password matches the supplied input. Useful for custom auth flows and re-verification. +description: Use Clerk's JS Backend SDK to check that the user's password matches the supplied input. Useful for custom auth flows and re-verification. sdk: js-backend --- diff --git a/docs/references/backend/user/verify-totp.mdx b/docs/references/backend/user/verify-totp.mdx index c255232520..a0ebddd231 100644 --- a/docs/references/backend/user/verify-totp.mdx +++ b/docs/references/backend/user/verify-totp.mdx @@ -1,6 +1,6 @@ --- title: '`verifyTOTP()`' -description: Use Clerk's Backend SDK to verify a TOTP or backup code for a user. +description: Use Clerk's JS Backend SDK to verify a TOTP or backup code for a user. sdk: js-backend --- diff --git a/docs/references/backend/verify-token.mdx b/docs/references/backend/verify-token.mdx index 4106b9eacd..a94710a1e6 100644 --- a/docs/references/backend/verify-token.mdx +++ b/docs/references/backend/verify-token.mdx @@ -1,6 +1,6 @@ --- title: '`verifyToken()`' -description: Use Clerk's Backend SDK to verify a token signature. +description: Use Clerk's JS Backend SDK to verify a token signature. sdk: js-backend --- diff --git a/docs/references/backend/verify-webhook.mdx b/docs/references/backend/verify-webhook.mdx index 2dedc0083d..7f80c29a19 100644 --- a/docs/references/backend/verify-webhook.mdx +++ b/docs/references/backend/verify-webhook.mdx @@ -1,6 +1,6 @@ --- title: '`verifyWebhook()`' -description: Use Clerk's Backend SDK to verify a webhook signature. +description: Use Clerk's JS Backend SDK to verify a webhook signature. sdk: js-backend --- diff --git a/docs/references/express/overview.mdx b/docs/references/express/overview.mdx index 4b6151bd1c..df00721b77 100644 --- a/docs/references/express/overview.mdx +++ b/docs/references/express/overview.mdx @@ -182,7 +182,7 @@ app.get('/path', (req, res) => { ## `clerkClient` -[Clerk's JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JavaScript Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint. +[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint. All resource operations are mounted as sub-APIs on the `clerkClient` object. See the [reference documentation](/docs/js-backend/getting-started/quickstart#usage){{ target: '_blank' }} for more information. diff --git a/docs/references/nextjs/app-router/route-handlers.mdx b/docs/references/nextjs/app-router/route-handlers.mdx index 96c17bbe6c..d0bf7f9aeb 100644 --- a/docs/references/nextjs/app-router/route-handlers.mdx +++ b/docs/references/nextjs/app-router/route-handlers.mdx @@ -93,9 +93,9 @@ export async function GET() { ## Interact with Clerk's Backend API -The [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments. +The [JS Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments. -`clerkClient` exposes an instance of the JavaScript Backend SDK for use in server environments. +`clerkClient` exposes an instance of the JS Backend SDK for use in server environments. ```ts {{ filename: 'app/api/route.ts' }} import { NextResponse, NextRequest } from 'next/server' diff --git a/docs/references/nuxt/overview.mdx b/docs/references/nuxt/overview.mdx index 4a56c52089..e757c39fa1 100644 --- a/docs/references/nuxt/overview.mdx +++ b/docs/references/nuxt/overview.mdx @@ -62,7 +62,7 @@ The `clerkMiddleware()` helper integrates Clerk authentication and authorization ## `clerkClient()` -The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart). [Learn more](/docs/nuxt/guides/users/reading). +The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart). [Learn more](/docs/nuxt/guides/users/reading). ## Protect pages and API routes diff --git a/docs/references/overview.mdx b/docs/references/overview.mdx index 795f8a19a0..5781c8497a 100644 --- a/docs/references/overview.mdx +++ b/docs/references/overview.mdx @@ -83,7 +83,7 @@ description: Learn about the Clerk and community SDK's available for integrating - [JS Backend SDK](/docs/references/backend/overview) - - The Clerk Backend SDK exposes our Backend API resources and low-level authentication utilities for JavaScript environments. + - The JavaScript Backend SDK exposes our Backend API resources and low-level authentication utilities for JavaScript environments. - --- From 1e2d9534e2f8807b703c9648b616553fb66ba9c1 Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Fri, 12 Sep 2025 14:27:55 -0400 Subject: [PATCH 2/4] update --- .../social-connections/overview.mdx | 2 +- docs/guides/secure/session-tasks.mdx | 114 +++++++----------- docs/guides/users/impersonation.mdx | 8 +- docs/references/astro/clerk-middleware.mdx | 2 +- 4 files changed, 51 insertions(+), 75 deletions(-) diff --git a/docs/guides/configure/auth-strategies/social-connections/overview.mdx b/docs/guides/configure/auth-strategies/social-connections/overview.mdx index 1e847b7cd7..57195e8823 100644 --- a/docs/guides/configure/auth-strategies/social-connections/overview.mdx +++ b/docs/guides/configure/auth-strategies/social-connections/overview.mdx @@ -74,7 +74,7 @@ Use the following tabs to see how to add additional OAuth scopes to the ` [!IMPORTANT] > Personal accounts being disabled by default was released on 08-22-2025. Applications created before this date will not be able to see the **Allow personal accounts** setting, because personal accounts were enabled by default. -If the prebuilt components don't meet your specific needs or if you require more control over the logic, you can also build your own UI using the `Session.currentTask` property to check if the user has pending session tasks. Refer to the [custom flows documentation](/docs/guides/development/custom-flows/overview) for specific implementation guides. +If the prebuilt components don't meet your specific needs or if you require more control over the logic, you can also build your own UI using the `Session.currentTask` property to check if the user has pending session tasks. To access the `Session.currentTask` property, you can use either the `useSession()` hook for React-based applications or `window.Clerk` for other frameworks. - + ```jsx - import { useSession } from '@clerk/clerk-react' - const { session } = useSession() if (session?.currentTask) { @@ -72,40 +70,25 @@ When users have pending session tasks, you can redirect them to specific pages o The `taskUrls` option allows you to specify custom URL paths where users are redirected after sign-up or sign-in when specific session tasks need to be completed. This allows you to still use `` and `` but have tasks with custom pages. - - - Configure the `taskUrls` option in your root layout to specify where users should be redirected for different session tasks. - - ```tsx {{ filename: 'app/layout.tsx' }} - import { ClerkProvider } from '@clerk/nextjs' - - export default function RootLayout({ children }: { children: React.ReactNode }) { - return ( - - {children} - - ) - } - ``` - +The `taskUrls` option is available wherever you initialize the Clerk integration. For most SDKs, it's ``. - - Create a custom page that imports the `TaskChooseOrganization` component to handle the task. +```tsx + + {children} + +``` - ```tsx {{ filename: 'app/onboarding/choose-organization/page.tsx' }} - import { TaskChooseOrganization } from '@clerk/nextjs' +Then, create a page at that URL path that imports the [``](/docs/references/components/authentication/task-choose-organization) component to handle the task. - export default function ChooseOrganizationPage() { - return - } - ``` - - +```tsx {{ filename: 'app/onboarding/choose-organization/page.tsx' }} +export default function Page() { + return +} +``` #### Using the `RedirectToTasks` control component @@ -130,34 +113,9 @@ export default function Layout({ children }: { children: React.ReactNode }) { #### Middleware-based redirects -For `auth.protect()`, signed-out users will be redirected to the sign-in page. In the following example, `pending` users will be redirected to the sign-in page, where the `` component will prompt them to fulfill the session tasks, which in this case is selecting or creating an organization. Once finished, their session will move from `pending` to an `active` (signed-in) state. - -```tsx {{ filename: 'middleware.ts', mark: [[6, 8]] }} -import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server' - -const isProtectedRoute = createRouteMatcher(['/dashboard(.*)', '/forum(.*)']) - -export default clerkMiddleware(async (auth, req) => { - // pending users won't be able to access protected routes - // and will be redirected to the sign-in page - if (isProtectedRoute(req)) await auth.protect() -}) - -export const config = { - matcher: [ - // Skip Next.js internals and all static files, unless found in search params - '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)', - // Always run for API routes - '/(api|trpc)(.*)', - ], -} -``` - For `auth().isAuthenticated`, it would return `false` if the user has a `pending` session. Pending users will be redirected to the sign-in page, where the `` component will prompt them to fulfill the session tasks. Once finished, their session will move from `pending` to a `signed-in` state. -```tsx {{ filename: 'app/middleware.ts', mark: [[6, 12]] }} -import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server' - +```tsx const isProtectedRoute = createRouteMatcher(['/dashboard(.*)', '/forum(.*)']) export default clerkMiddleware(async (auth, req) => { @@ -169,17 +127,33 @@ export default clerkMiddleware(async (auth, req) => { return redirectToSignIn() } }) - -export const config = { - matcher: [ - // Skip Next.js internals and all static files, unless found in search params - '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)', - // Always run for API routes - '/(api|trpc)(.*)', - ], -} ``` + + For `auth.protect()`, signed-out users will be redirected to the sign-in page. In the following example, `pending` users will be redirected to the sign-in page, where the `` component will prompt them to fulfill the session tasks, which in this case is selecting or creating an organization. Once finished, their session will move from `pending` to an `active` (signed-in) state. + + ```tsx {{ filename: 'middleware.ts', mark: [[6, 8]] }} + import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server' + + const isProtectedRoute = createRouteMatcher(['/dashboard(.*)', '/forum(.*)']) + + export default clerkMiddleware(async (auth, req) => { + // pending users won't be able to access protected routes + // and will be redirected to the sign-in page + if (isProtectedRoute(req)) await auth.protect() + }) + + export const config = { + matcher: [ + // Skip Next.js internals and all static files, unless found in search params + '/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)', + // Always run for API routes + '/(api|trpc)(.*)', + ], + } + ``` + + ### Session handling By default, `pending` sessions are treated as signed-out across Clerk's authentication context. Some control components and authentication utilities accept a `treatPendingAsSignedOut` prop to control how `pending` sessions are handled: diff --git a/docs/guides/users/impersonation.mdx b/docs/guides/users/impersonation.mdx index 5383a5835a..8ca11044b7 100644 --- a/docs/guides/users/impersonation.mdx +++ b/docs/guides/users/impersonation.mdx @@ -79,7 +79,7 @@ Clerk also adds an `act` claim on the [Clerk session token](/docs/guides/session To detect impersonated sessions in the frontend, the `actor` object contains the `sub` claim of the impersonator. You can use this information to detect impersonated sessions. - + You can use the [`useAuth()`](/docs/references/hooks/use-auth) hook to get access to the authentication context, which includes the `actor` object. @@ -126,7 +126,7 @@ To detect impersonated sessions in the frontend, the `actor` object contains the ### Detect impersonated sessions in the backend -The [`Auth`](/docs/references/backend/types/auth-object) object is a server-side object that contains the `actor` object, as well as important information like the current user's session ID and user ID. Accessing the `Auth` object differs [depending on the SDK you're using](/docs/references/backend/types/auth-object#how-to-access-the-auth-object). Here are some examples: +The [`Auth`](/docs/references/backend/types/auth-object) object is a server-side object that contains the `actor` object, as well as important information like the current user's session ID and user ID. **Accessing the `Auth` object differs [depending on the SDK you're using](/docs/references/backend/types/auth-object#how-to-access-the-auth-object).** Here are some examples: @@ -136,7 +136,9 @@ The [`Auth`](/docs/references/backend/types/auth-object) object is a server-side import { auth } from '@clerk/nextjs/server' export default async function Page() { - // Use Clerk's `auth()` helper to access the `Auth` object + // The `Auth` object gives you access to properties like `userId` and `actor` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object const { userId, actor } = await auth() return ( diff --git a/docs/references/astro/clerk-middleware.mdx b/docs/references/astro/clerk-middleware.mdx index 1131111ba4..74d4b5c7f9 100644 --- a/docs/references/astro/clerk-middleware.mdx +++ b/docs/references/astro/clerk-middleware.mdx @@ -45,7 +45,7 @@ import { clerkMiddleware, createRouteMatcher } from '@clerk/astro/server' const isProtectedRoute = createRouteMatcher(['/dashboard(.*)', '/forum(.*)']) export const onRequest = clerkMiddleware((auth, context) => { - const { isAuthenticated, redirectToSignIn, userId } = auth() + const { isAuthenticated, redirectToSignIn } = auth() if (!isAuthenticated && isProtectedRoute(context.request)) { // Add custom logic to run before redirecting From 3808510482a47584a764c389f8e79566630ce523 Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Fri, 12 Sep 2025 16:30:56 -0400 Subject: [PATCH 3/4] update --- docs/_partials/authenticate-req.mdx | 11 ++- docs/_partials/backend/usage.mdx | 2 +- .../sessions/customize-session-tokens.mdx | 41 +++++---- .../sessions/manual-jwt-verification.mdx | 40 ++++++++- docs/guides/sessions/session-tokens.mdx | 81 ++++++++++++------ .../backend/authenticate-request.mdx | 83 ++++++++++++++----- 6 files changed, 193 insertions(+), 65 deletions(-) diff --git a/docs/_partials/authenticate-req.mdx b/docs/_partials/authenticate-req.mdx index b3135e8205..0777f2ffd3 100644 --- a/docs/_partials/authenticate-req.mdx +++ b/docs/_partials/authenticate-req.mdx @@ -2,17 +2,22 @@ import { createClerkClient } from '@clerk/backend' export async function GET(req: Request) { + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, publishableKey: process.env.CLERK_PUBLISHABLE_KEY, }) - const { isSignedIn } = await clerkClient.authenticateRequest(req, { - jwtKey: process.env.CLERK_JWT_KEY, + // Use the `authenticateRequest()` method to verify the token + const { isAuthenticated } = await clerkClient.authenticateRequest(req, { authorizedParties: ['https://example.com'], + jwtKey: process.env.CLERK_JWT_KEY, }) - if (!isSignedIn) { + // Protect the route from unauthenticated users + if (!isAuthenticated) { return Response.json({ status: 401 }) } diff --git a/docs/_partials/backend/usage.mdx b/docs/_partials/backend/usage.mdx index 262c3136dd..6294086b10 100644 --- a/docs/_partials/backend/usage.mdx +++ b/docs/_partials/backend/usage.mdx @@ -1,2 +1,2 @@ > [!NOTE] -> Importing `clerkClient` varies based on your framework. Refer to the [JS Backend SDK overview](/docs/js-backend/getting-started/quickstart) for usage details, including guidance on [how to access the `userId` and other properties](/docs/js-backend/getting-started/quickstart#get-the-user-id-and-other-properties). +> Using `clerkClient` varies based on your framework. Refer to the [JS Backend SDK overview](/docs/js-backend/getting-started/quickstart) for usage details, including guidance on [how to access the `userId` and other properties](/docs/js-backend/getting-started/quickstart#get-the-user-id-and-other-properties). diff --git a/docs/guides/sessions/customize-session-tokens.mdx b/docs/guides/sessions/customize-session-tokens.mdx index 4e4e9568fe..3fd3f5ef78 100644 --- a/docs/guides/sessions/customize-session-tokens.mdx +++ b/docs/guides/sessions/customize-session-tokens.mdx @@ -23,7 +23,7 @@ This guide will show you how to customize a session token to include additional ## Use the custom claims in your application - The [`Auth`](/docs/references/backend/types/auth-object) object includes a `sessionClaims` property that contains the custom claims you added to your session token. Accessing the `Auth` object differs depending on the framework you are using. See the [reference doc](/docs/references/backend/types/auth-object) for more information. + The [`Auth`](/docs/references/backend/types/auth-object) object includes a `sessionClaims` property that contains the custom claims you added to your session token. **Accessing the `Auth` object differs depending on the SDK you're using. See the [reference doc](/docs/references/backend/types/auth-object) for more information.** The following example demonstrates how to access the `fullName` and `primaryEmail` claims that were added to the session token in the last step. @@ -37,7 +37,12 @@ This guide will show you how to customize a session token to include additional import { NextResponse } from 'next/server' export async function GET() { - const { sessionClaims } = await auth() + // Use `auth()` to access the user's session claims + const { isAuthenticated, sessionClaims } = await auth() + + if (!isAuthenticated) { + return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }) + } const fullName = sessionClaims.fullName @@ -52,8 +57,12 @@ This guide will show you how to customize a session token to include additional import type { NextApiRequest, NextApiResponse } from 'next' export default async function handler(req: NextApiRequest, res: NextApiResponse) { - // Use `getAuth()` to access `isAuthenticated` and the user's ID and session claims - const { sessionClaims } = getAuth(req) + // Use `getAuth()` to access the user's session claims + const { isAuthenticated, sessionClaims } = getAuth(req) + + if (!isAuthenticated) { + return res.status(401).json({ error: 'Unauthorized' }) + } const fullName = sessionClaims.fullName @@ -72,8 +81,8 @@ This guide will show you how to customize a session token to include additional import type { APIRoute } from 'astro' export const GET: APIRoute = async ({ locals }) => { - // Use `locals.auth()` to access `isAuthenticated` and the user's ID and session claims - const { isAuthenticated, userId, sessionClaims } = await locals.auth() + // Use `locals.auth()` to access the user's session claims + const { isAuthenticated, sessionClaims } = await locals.auth() // Protect the route by checking if the user is signed in if (!isAuthenticated) { @@ -102,9 +111,13 @@ This guide will show you how to customize a session token to include additional // Apply `clerkMiddleware()` to all routes app.use(clerkMiddleware()) - // Use `getAuth()` to get the session claims const getSessionClaims = (req, res, next) => { - const { sessionClaims } = getAuth(req) + // Use `getAuth()` to access the user's session claims + const { isAuthenticated, sessionClaims } = getAuth(req) + + if (!isAuthenticated) { + return res.status(401).json({ error: 'Unauthorized' }) + } const fullName = sessionClaims.fullName @@ -195,8 +208,8 @@ This guide will show you how to customize a session token to include additional import type { Route } from './+types/profile' export async function loader(args: Route.LoaderArgs) { - // Use `getAuth()` to access `isAuthenticated` and the user's ID and session claims - const { isAuthenticated, userId, sessionClaims } = await getAuth(args) + // Use `getAuth()` to access the user's session claims + const { isAuthenticated, sessionClaims } = await getAuth(args) // Protect the route by checking if the user is signed in if (!isAuthenticated) { @@ -233,8 +246,8 @@ This guide will show you how to customize a session token to include additional import { createClerkClient } from '@clerk/remix/api.server' export const loader: LoaderFunction = async (args) => { - // Use `getAuth()` to access `isAuthenticated` and the user's ID and session claims - const { isAuthenticated, userId, sessionClaims } = await getAuth(args) + // Use `getAuth()` to access the user's session claims + const { isAuthenticated, sessionClaims } = await getAuth(args) // Protect the route by checking if the user is signed in if (!isAuthenticated) { @@ -260,8 +273,8 @@ This guide will show you how to customize a session token to include additional export const ServerRoute = createServerFileRoute().methods({ GET: async ({ request, params }) => { - // Use `getAuth()` to access `isAuthenticated` and the user's ID and session claims - const { isAuthenticated, userId, sessionClaims } = await getAuth(request) + // Use `getAuth()` to access the user's session claims + const { isAuthenticated, sessionClaims } = await getAuth(request) // Protect the API route by checking if the user is signed in if (!isAuthenticated) { diff --git a/docs/guides/sessions/manual-jwt-verification.mdx b/docs/guides/sessions/manual-jwt-verification.mdx index 9e9ffff828..c2cbc28670 100644 --- a/docs/guides/sessions/manual-jwt-verification.mdx +++ b/docs/guides/sessions/manual-jwt-verification.mdx @@ -11,9 +11,45 @@ For every request, you must validate the token to ensure it hasn't expired or be The [`authenticateRequest()`](/docs/references/backend/authenticate-request) method from the JS Backend SDK accepts the `request` object and authenticates the session token in it. -The following example uses the `authenticateRequest()` method to verify the session token. It also performs networkless authentication by passing `jwtKey`. This verifies if the user is signed into the application. For more information, including usage with higher-level SDKs, see the [`authenticateRequest()` reference](/docs/references/backend/authenticate-request). +The following example uses the `authenticateRequest()` method to verify the session token. It also performs networkless authentication by passing `jwtKey`. This verifies if the user is signed into the application. - + + + If you are using the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) on its own, you need to provide the `secretKey` and `publishableKey` to `createClerkClient()` so that it is passed to `authenticateRequest()`. You can set these values as [environment variables](/docs/guides/development/clerk-environment-variables#clerk-publishable-and-secret-keys) and then pass them to the function. + + + + + + `authenticateRequest()` requires `publishableKey` to be set. If you are importing `clerkClient` from a higher-level SDK, such as Next.js, then `clerkClient` infers the `publishableKey` from your [environment variables](/docs/guides/development/clerk-environment-variables#clerk-publishable-and-secret-keys). The following example uses Next.js, but the same logic applies for other SDKs. + + ```tsx + import { clerkClient } from '@clerk/nextjs/server' + + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + const client = await clerkClient() + + export async function GET(req: Request) { + // Use the `authenticateRequest()` method to verify the token + const { isAuthenticated } = await client.authenticateRequest(req, { + authorizedParties: ['https://example.com'], + jwtKey: process.env.CLERK_JWT_KEY, + }) + + // Protect the route from unauthenticated users + if (!isAuthenticated) { + return Response.json({ status: 401 }) + } + + // Add logic to perform protected actions + + return Response.json({ message: 'This is a reply' }) + } + ``` + + ## Manually verify a session token diff --git a/docs/guides/sessions/session-tokens.mdx b/docs/guides/sessions/session-tokens.mdx index be2497892f..b8d41b9555 100644 --- a/docs/guides/sessions/session-tokens.mdx +++ b/docs/guides/sessions/session-tokens.mdx @@ -150,6 +150,8 @@ You could store only the necessary data in the session token - for example, just Then, when you need to access the other metadata fields, you can fetch them using a separate API call from your backend. The following example uses the [`getUser()`](/docs/references/backend/user/get-user) method to access the current user's [Backend `User` object](/docs/references/backend/types/backend-user), which includes the `publicMetadata` field. +**If your SDK isn't listed, you can use the comments in the example to help you adapt it to your SDK.** + @@ -157,7 +159,9 @@ Then, when you need to access the other metadata fields, you can fetch them usin import { auth, clerkClient } from '@clerk/nextjs/server' export async function GET() { - // Use `auth()` to access `isAuthenticated` and the user's ID + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object const { isAuthenticated, userId } = await auth() // Protect the route by checking if the user is signed in @@ -165,9 +169,12 @@ Then, when you need to access the other metadata fields, you can fetch them usin return new NextResponse('Unauthorized', { status: 401 }) } + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart const client = await clerkClient() - // Use the JS Backend SDK's `getUser()` method to get the Backend User object + // Use the`getUser()` method to get the Backend User object const user = await client.users.getUser(userId) // Return the Backend User object @@ -184,7 +191,9 @@ Then, when you need to access the other metadata fields, you can fetch them usin import { clerkClient } from '@clerk/astro/server' export async function GET(context) { - // Use `locals.auth()` to access `isAuthenticated` and the user's ID + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object const { isAuthenticated, userId } = context.locals.auth() // Protect the route by checking if the user is signed in @@ -192,7 +201,10 @@ Then, when you need to access the other metadata fields, you can fetch them usin return new Response('Unauthorized', { status: 401 }) } - // Use the JS Backend SDK's `getUser()` method to get the Backend User object + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + // Use the `getUser()` method to get the Backend User object const user = await clerkClient(context).users.getUser(userId) // Return the Backend User object @@ -210,7 +222,9 @@ Then, when you need to access the other metadata fields, you can fetch them usin const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }) app.get('/user', async (req, res) => { - // Use `getAuth()` to access `isAuthenticated` and the user's ID + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object const { isAuthenticated, userId } = getAuth(req) // Protect the route by checking if the user is signed in @@ -218,7 +232,10 @@ Then, when you need to access the other metadata fields, you can fetch them usin res.status(401).json({ error: 'User not authenticated' }) } - // Use the JS Backend SDK's `getUser()` method to get the Backend User object + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + // Use the `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object @@ -235,7 +252,9 @@ Then, when you need to access the other metadata fields, you can fetch them usin import type { Route } from './+types/profile' export async function loader(args: Route.LoaderArgs) { - // Use `getAuth()` to access `isAuthenticated` and the user's ID + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object const { isAuthenticated, userId } = await getAuth(args) // Protect the route by checking if the user is signed in @@ -243,7 +262,10 @@ Then, when you need to access the other metadata fields, you can fetch them usin return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the JS Backend SDK's `getUser()` method to get the Backend User object + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + // Use the `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -264,15 +286,20 @@ Then, when you need to access the other metadata fields, you can fetch them usin import { createClerkClient } from '@clerk/remix/api.server' export const loader: LoaderFunction = async (args) => { - // Use `getAuth()` to access `isAuthenticated` and the user's ID + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object const { isAuthenticated, userId } = await getAuth(args) - // If there is no userId, then redirect to sign-in route + // Protect the route from unauthenticated users if (!isAuthenticated) { return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the JS Backend SDK's `getUser()` method to get the Backend User object + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + // Use the `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -288,24 +315,26 @@ Then, when you need to access the other metadata fields, you can fetch them usin import { createClerkClient } from '@clerk/remix/api.server' export const action: ActionFunction = async (args) => { - // Use `getAuth()` to access `isAuthenticated` and the user's ID + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object const { isAuthenticated, userId } = await getAuth(args) - // If there is no userId, then redirect to sign-in route + // Protect the route from unauthenticated users if (!isAuthenticated) { return redirect('/sign-in?redirect_url=' + args.request.url) } - // Prepare the data for the mutation - const params = { firstName: 'John', lastName: 'Wicker' } - - // // Use the JS Backend SDK's `updateUser()` method to update the Backend User object - const updatedUser = await createClerkClient({ + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + // Use the `getUser()` method to get the Backend User object + const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, - }).users.updateUser(userId, params) + }).users.getUser(userId) - // Return the updated user - return { serialisedUser: JSON.stringify(updatedUser) } + // Return the Backend User object + return { serialisedUser: JSON.stringify(user) } } ``` @@ -320,7 +349,9 @@ Then, when you need to access the other metadata fields, you can fetch them usin export const Route = createAPIFileRoute('/api/example')({ GET: async ({ request, params }) => { - // Use `getAuth()` to access `isAuthenticated` and the user's ID + // The `Auth` object gives you access to properties like `isAuthenticated` and `userId` + // Accessing the `Auth` object differs depending on the SDK you're using + // https://clerk.com/docs/references/backend/types/auth-object#how-to-access-the-auth-object const { isAuthenticated, userId } = await getAuth(req) // Protect the route by checking if the user is signed in @@ -328,10 +359,12 @@ Then, when you need to access the other metadata fields, you can fetch them usin return json({ error: 'Unauthorized' }, { status: 401 }) } - // Instantiate the Backend SDK + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart const clerkClient = createClerkClient({ secretKey: import.meta.env.CLERK_SECRET_KEY }) - // Use the JS Backend SDK's `getUser()` method to get the Backend User object + // Use the `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object diff --git a/docs/references/backend/authenticate-request.mdx b/docs/references/backend/authenticate-request.mdx index 937c5380e5..f841466813 100644 --- a/docs/references/backend/authenticate-request.mdx +++ b/docs/references/backend/authenticate-request.mdx @@ -138,23 +138,27 @@ It is recommended to set these options as [environment variables](/docs/guides/d - `authenticateRequest()` requires `publishableKey` to be set. If you are importing `clerkClient` from a higher-level SDK, such as Next.js, then `clerkClient` infers the `publishableKey` from your [environment variables](/docs/guides/development/clerk-environment-variables#clerk-publishable-and-secret-keys). The following example uses Next.js, but the same logic applies for other frameworks. + `authenticateRequest()` requires `publishableKey` to be set. If you are importing `clerkClient` from a higher-level SDK, such as Next.js, then `clerkClient` infers the `publishableKey` from your [environment variables](/docs/guides/development/clerk-environment-variables#clerk-publishable-and-secret-keys). The following example uses Next.js, but the same logic applies for other SDKs. ```tsx import { clerkClient } from '@clerk/nextjs/server' + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart const client = await clerkClient() export async function GET(req: Request) { + // Use the `authenticateRequest()` method to verify the token const { isAuthenticated } = await client.authenticateRequest(req, { authorizedParties: ['https://example.com'], }) + // Protect the route from unauthenticated users if (!isAuthenticated) { return Response.json({ status: 401 }) } - // Perform protected actions // Add logic to perform protected actions return Response.json({ message: 'This is a reply' }) @@ -167,31 +171,68 @@ It is recommended to set these options as [environment variables](/docs/guides/d By default, `authenticateRequest()` will authenticate a session request. To authenticate a machine request, you need to set the `acceptsToken` option to a machine token type, such as `'api_key'`, `'oauth_token'` or `'m2m_token'`. -```tsx -import { createClerkClient } from '@clerk/backend' + + + ```tsx + import { createClerkClient } from '@clerk/backend' + + export async function GET(request: Request) { + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + const clerkClient = createClerkClient({ + secretKey: process.env.CLERK_SECRET_KEY, + publishableKey: process.env.CLERK_PUBLISHABLE_KEY, + }) -export async function GET(request: Request) { - const clerkClient = createClerkClient({ - secretKey: process.env.CLERK_SECRET_KEY, - publishableKey: process.env.CLERK_PUBLISHABLE_KEY, - }) + // Use the `authenticateRequest()` method to verify the token + const { isAuthenticated } = await clerkClient.authenticateRequest(request, { + acceptsToken: 'oauth_token', + }) - const { isAuthenticated } = await clerkClient.authenticateRequest(request, { - acceptsToken: 'oauth_token', - }) + // Protect the route from unauthenticated users + if (!isAuthenticated) { + return Response.json({ status: 401 }) + } - if (!isAuthenticated) { - return Response.json({ status: 401 }) - } + // Add logic to perform protected actions - // Add logic to perform protected actions - return Response.json({ message: 'This is a machine-to-machine reply' }) -} -``` + return Response.json({ message: 'This is a machine-to-machine reply' }) + } + ``` + -### Networkless token verification + + This example uses Next.js, but the same logic applies for other SDKs. You can use the comments in the example to help you adapt it to your SDK. -{/* Note: this example is duped from /authenticate-request. Probably a good opportunity to use a partial here */} + ```tsx + import { clerkClient } from '@clerk/nextjs/server' + + // Initialize the JS Backend SDK + // This varies depending on the SDK you're using + // https://clerk.com/docs/js-backend/getting-started/quickstart + const client = await clerkClient() + + export async function GET(req: Request) { + // Use the `authenticateRequest()` method to verify the token + const { isAuthenticated } = await client.authenticateRequest(request, { + acceptsToken: 'oauth_token', + }) + + // Protect the route from unauthenticated users + if (!isAuthenticated) { + return Response.json({ status: 401 }) + } + + // Add logic to perform protected actions + + return Response.json({ message: 'This is a machine-to-machine reply' }) + } + ``` + + + +### Networkless token verification The following example uses the `authenticateRequest()` method with the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) to verify the token passed by the frontend, and performs a networkless authentication by passing `jwtKey`. This will verify if the user is signed into the application or not. From e4a6b8ff37ad605b842f4609b849c4a47b8b95cf Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Fri, 12 Sep 2025 16:42:10 -0400 Subject: [PATCH 4/4] backend sdk --> js backend sdk --- docs/_partials/backend/usage.mdx | 2 +- docs/_partials/fastify/get-auth.mdx | 2 +- docs/_partials/nextjs/build-clerk-props.mdx | 2 +- docs/_partials/nextjs/get-auth.mdx | 2 +- docs/getting-started/quickstart.expressjs.mdx | 2 +- .../getting-started/quickstart.js-backend.mdx | 36 +++++++++---------- .../social-connections/overview.mdx | 2 +- .../account-updates/user-impersonation.mdx | 4 +-- docs/guides/development/endpoints.mdx | 4 +-- .../guides/development/migrating/overview.mdx | 2 +- .../sdk-development/backend-only.mdx | 2 +- .../upgrade-guides/core-2/backend.mdx | 2 +- docs/guides/organizations/invitations.mdx | 8 ++--- docs/guides/organizations/metadata.mdx | 2 +- docs/guides/secure/basic-rbac.mdx | 2 +- docs/guides/sessions/force-token-refresh.mdx | 4 +-- .../sessions/manual-jwt-verification.mdx | 4 +-- docs/guides/sessions/session-tokens.mdx | 16 ++++----- docs/guides/users/extending.mdx | 6 ++-- docs/guides/users/inviting.mdx | 8 ++--- docs/guides/users/managing.mdx | 14 ++++---- docs/guides/users/reading.mdx | 2 +- docs/guides/users/reading.nuxt.mdx | 4 +-- docs/guides/users/reading.react-router.mdx | 8 ++--- docs/guides/users/reading.remix.mdx | 6 ++-- .../users/reading.tanstack-react-start.mdx | 4 +-- docs/index.mdx | 2 +- docs/references/astro/overview.mdx | 2 +- .../allowlist/create-allowlist-identifier.mdx | 2 +- .../allowlist/delete-allowlist-identifier.mdx | 2 +- .../get-allowlist-identifier-list.mdx | 2 +- .../backend/authenticate-request.mdx | 6 ++-- .../billing/cancel-subscription-item.mdx | 2 +- .../get-organization-billing-subscription.mdx | 2 +- .../backend/billing/get-plan-list.mdx | 2 +- .../billing/get-user-billing-subscription.mdx | 2 +- docs/references/backend/client/get-client.mdx | 2 +- .../backend/client/verify-client.mdx | 2 +- .../backend/domains/delete-domain.mdx | 2 +- .../email-addresses/create-email-address.mdx | 2 +- .../email-addresses/delete-email-address.mdx | 2 +- .../email-addresses/get-email-address.mdx | 2 +- .../email-addresses/update-email-address.mdx | 2 +- .../backend/invitations/create-invitation.mdx | 2 +- .../invitations/get-invitation-list.mdx | 2 +- .../backend/invitations/revoke-invitation.mdx | 2 +- .../backend/m2m-tokens/create-token.mdx | 2 +- .../backend/m2m-tokens/revoke-token.mdx | 2 +- .../backend/m2m-tokens/verify-token.mdx | 2 +- .../backend/oauth-applications/create.mdx | 2 +- .../backend/oauth-applications/delete.mdx | 2 +- .../backend/oauth-applications/get.mdx | 2 +- .../backend/oauth-applications/list.mdx | 2 +- .../oauth-applications/rotate-secret.mdx | 2 +- .../backend/oauth-applications/update.mdx | 2 +- .../create-organization-invitation-bulk.mdx | 2 +- .../create-organization-invitation.mdx | 2 +- .../create-organization-membership.mdx | 2 +- .../organization/create-organization.mdx | 2 +- .../organization/delete-organization-logo.mdx | 2 +- .../delete-organization-membership.mdx | 2 +- .../organization/delete-organization.mdx | 2 +- .../get-organization-invitation-list.mdx | 2 +- .../get-organization-invitation.mdx | 2 +- .../organization/get-organization-list.mdx | 2 +- .../get-organization-membership-list.mdx | 2 +- .../backend/organization/get-organization.mdx | 2 +- .../revoke-organization-invitation.mdx | 2 +- .../organization/update-organization-logo.mdx | 4 +-- ...pdate-organization-membership-metadata.mdx | 2 +- .../update-organization-membership.mdx | 2 +- .../update-organization-metadata.mdx | 2 +- .../organization/update-organization.mdx | 2 +- docs/references/backend/overview.mdx | 4 +-- .../phone-numbers/create-phone-number.mdx | 2 +- .../phone-numbers/delete-phone-number.mdx | 2 +- .../phone-numbers/get-phone-number.mdx | 2 +- .../phone-numbers/update-phone-number.mdx | 2 +- .../redirect-urls/create-redirect-url.mdx | 2 +- .../redirect-urls/delete-redirect-url.mdx | 2 +- .../redirect-urls/get-redirect-url-list.mdx | 2 +- .../redirect-urls/get-redirect-url.mdx | 2 +- .../create-saml-connection.mdx | 2 +- .../delete-saml-connection.mdx | 2 +- .../get-saml-connection-list.mdx | 2 +- .../saml-connections/get-saml-connection.mdx | 2 +- .../update-saml-connection.mdx | 2 +- .../backend/sessions/get-session-list.mdx | 2 +- .../backend/sessions/get-session.mdx | 2 +- .../references/backend/sessions/get-token.mdx | 4 +-- .../backend/sessions/revoke-session.mdx | 2 +- .../backend/sessions/verify-session.mdx | 2 +- .../sign-in-tokens/create-sign-in-token.mdx | 2 +- .../sign-in-tokens/revoke-sign-in-token.mdx | 2 +- .../testing-tokens/create-testing-token.mdx | 2 +- docs/references/backend/user/ban-user.mdx | 2 +- docs/references/backend/user/create-user.mdx | 2 +- .../backend/user/delete-user-backup-codes.mdx | 2 +- .../user/delete-user-external-account.mdx | 2 +- .../backend/user/delete-user-passkey.mdx | 2 +- .../user/delete-user-profile-image.mdx | 4 +-- .../backend/user/delete-user-totp.mdx | 2 +- .../backend/user/delete-user-web3-wallet.mdx | 2 +- docs/references/backend/user/delete-user.mdx | 2 +- .../backend/user/disable-user-mfa.mdx | 2 +- docs/references/backend/user/get-count.mdx | 2 +- .../user/get-organization-invitation-list.mdx | 2 +- .../user/get-organization-membership-list.mdx | 2 +- .../references/backend/user/get-user-list.mdx | 2 +- .../user/get-user-oauth-access-token.mdx | 2 +- docs/references/backend/user/get-user.mdx | 2 +- docs/references/backend/user/lock-user.mdx | 2 +- docs/references/backend/user/unban-user.mdx | 2 +- docs/references/backend/user/unlock-user.mdx | 2 +- .../backend/user/update-user-metadata.mdx | 2 +- .../user/update-user-profile-image.mdx | 4 +-- docs/references/backend/user/update-user.mdx | 2 +- .../backend/user/verify-password.mdx | 2 +- docs/references/backend/user/verify-totp.mdx | 2 +- docs/references/backend/verify-token.mdx | 2 +- docs/references/backend/verify-webhook.mdx | 2 +- docs/references/express/overview.mdx | 4 +-- .../nextjs/app-router/route-handlers.mdx | 4 +-- docs/references/nuxt/overview.mdx | 2 +- docs/references/overview.mdx | 2 +- 125 files changed, 183 insertions(+), 183 deletions(-) diff --git a/docs/_partials/backend/usage.mdx b/docs/_partials/backend/usage.mdx index 4dd40c2489..262c3136dd 100644 --- a/docs/_partials/backend/usage.mdx +++ b/docs/_partials/backend/usage.mdx @@ -1,2 +1,2 @@ > [!NOTE] -> Importing `clerkClient` varies based on your framework. Refer to the [Backend SDK overview](/docs/js-backend/getting-started/quickstart) for usage details, including guidance on [how to access the `userId` and other properties](/docs/js-backend/getting-started/quickstart#get-the-user-id-and-other-properties). +> Importing `clerkClient` varies based on your framework. Refer to the [JS Backend SDK overview](/docs/js-backend/getting-started/quickstart) for usage details, including guidance on [how to access the `userId` and other properties](/docs/js-backend/getting-started/quickstart#get-the-user-id-and-other-properties). diff --git a/docs/_partials/fastify/get-auth.mdx b/docs/_partials/fastify/get-auth.mdx index 7936b6f203..ec714e234b 100644 --- a/docs/_partials/fastify/get-auth.mdx +++ b/docs/_partials/fastify/get-auth.mdx @@ -21,7 +21,7 @@ fastify.get('/protected', async (request, reply) => { return reply.code(401).send({ error: 'User not authenticated' }) } - // Use `clerkClient` to access Clerk's Backend SDK methods + // Use `clerkClient` to access Clerk's JS Backend SDK methods // and get the user's User object const user = await clerkClient.users.getUser(userId) diff --git a/docs/_partials/nextjs/build-clerk-props.mdx b/docs/_partials/nextjs/build-clerk-props.mdx index a964abcb54..0a663f6961 100644 --- a/docs/_partials/nextjs/build-clerk-props.mdx +++ b/docs/_partials/nextjs/build-clerk-props.mdx @@ -18,7 +18,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { } } - // Initialize the Backend SDK + // Initialize the JS Backend SDK const client = await clerkClient() // Get the user's full `Backend User` object diff --git a/docs/_partials/nextjs/get-auth.mdx b/docs/_partials/nextjs/get-auth.mdx index 5ac27a3dd3..d916408ae2 100644 --- a/docs/_partials/nextjs/get-auth.mdx +++ b/docs/_partials/nextjs/get-auth.mdx @@ -11,7 +11,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) return res.status(401).json({ error: 'Unauthorized' }) } - // Initialize the Backend SDK + // Initialize the JS Backend SDK const client = await clerkClient() // Get the user's full Backend User object diff --git a/docs/getting-started/quickstart.expressjs.mdx b/docs/getting-started/quickstart.expressjs.mdx index e15253f9ed..5309750522 100644 --- a/docs/getting-started/quickstart.expressjs.mdx +++ b/docs/getting-started/quickstart.expressjs.mdx @@ -131,7 +131,7 @@ Learn how to integrate Clerk into your Express backend for secure user authentic // Use `getAuth()` to get the user's `userId` const { userId } = getAuth(req) - // Use Clerk's JavaScript Backend SDK to get the user's User object + // Use Clerk's JS Backend SDK to get the user's User object const user = await clerkClient.users.getUser(userId) return res.json({ user }) diff --git a/docs/getting-started/quickstart.js-backend.mdx b/docs/getting-started/quickstart.js-backend.mdx index 0d32ba843c..f63539a989 100644 --- a/docs/getting-started/quickstart.js-backend.mdx +++ b/docs/getting-started/quickstart.js-backend.mdx @@ -6,13 +6,13 @@ sdk: js-backend [Clerk's JavaScript Backend SDK](/docs/references/backend/overview) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities **for JavaScript environments**. -For example, if you wanted to get a list of all users in your application, instead of creating a fetch to [`https://api.clerk.com/v1/users`](/docs/reference/backend-api/tag/users/get/users){{ target: '_blank' }} endpoint, you can use the [`users.getUserList()`](/docs/references/backend/user/get-user-list) method provided by the JavaScript Backend SDK. +For example, if you wanted to get a list of all users in your application, instead of creating a fetch to [`https://api.clerk.com/v1/users`](/docs/reference/backend-api/tag/users/get/users){{ target: '_blank' }} endpoint, you can use the [`users.getUserList()`](/docs/references/backend/user/get-user-list) method provided by the JS Backend SDK. ## Installation - + - If you are using the JavaScript Backend SDK on its own, you can install it using the following command: + If you are using the JS Backend SDK on its own, you can install it using the following command: ```bash {{ filename: 'terminal' }} @@ -34,7 +34,7 @@ For example, if you wanted to get a list of all users in your application, inste - Clerk SDKs expose an instance of the JavaScript Backend SDK for use in server environments, so there is no need to install it separately. + Clerk SDKs expose an instance of the JS Backend SDK for use in server environments, so there is no need to install it separately. @@ -44,7 +44,7 @@ All resource operations are mounted as sub-APIs on the `clerkClient` object. For To access a resource, you must first instantiate a `clerkClient` instance. - + To instantiate a `clerkClient` instance, you must call `createClerkClient()` and pass in [`options`](#create-clerk-client-options). @@ -103,7 +103,7 @@ To access a resource, you must first instantiate a `clerkClient` instance. ### Instantiate a custom `clerkClient` instance - If you would like to customize the behavior of the JavaScript Backend SDK, you can instantiate a `clerkClient` instance yourself by calling `createClerkClient()` and passing in [`options`](#create-clerk-client-options). + If you would like to customize the behavior of the JS Backend SDK, you can instantiate a `clerkClient` instance yourself by calling `createClerkClient()` and passing in [`options`](#create-clerk-client-options). @@ -125,7 +125,7 @@ To access a resource, you must first instantiate a `clerkClient` instance. import { createClerkClient } from '@clerk/remix/api.server' ``` - Use the following tabs to see examples of how to use the Backend SDK in Remix Loader and Action functions. + Use the following tabs to see examples of how to use the JS Backend SDK in Remix Loader and Action functions. @@ -297,9 +297,9 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa - + - The following example demonstrates how to retrieve the authenticated user's ID using `request.auth` when you're not using a specific framework helper. It also shows how to use the Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user). + The following example demonstrates how to retrieve the authenticated user's ID using `request.auth` when you're not using a specific framework helper. It also shows how to use the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user). ```js import { createClerkClient } from '@clerk/backend' @@ -315,7 +315,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return null } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object @@ -325,7 +325,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa - The following examples demonstrate how to retrieve the authenticated user's ID using framework-specific auth helpers and how to use the Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user). + The following examples demonstrate how to retrieve the authenticated user's ID using framework-specific auth helpers and how to use the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method to get the [Backend `User` object](/docs/references/backend/types/backend-user). {/* TODO: The following Tabs example is duplicated in the guides/how-clerk-works/session-tokens.mdx file. It cannot be a partial to be reused across both files because this example includes a partial and partials cannot include partials. Also, the text in each of these tabs is removed in the other file as its not relevant to that file's example. So keep these two Tabs examples in sync please. */} @@ -350,7 +350,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa const client = await clerkClient() - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await client.users.getUser(userId) // Return the Backend User object @@ -377,7 +377,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return new Response('Unauthorized', { status: 401 }) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient(context).users.getUser(userId) // Return the Backend User object @@ -405,7 +405,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa res.status(401).json({ error: 'User not authenticated' }) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object @@ -432,7 +432,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -463,7 +463,7 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -517,10 +517,10 @@ The [`Auth`](/docs/references/backend/types/auth-object) object contains importa return json({ error: 'Unauthorized' }, { status: 401 }) } - // Instantiate the Backend SDK + // Instantiate the JS Backend SDK const clerkClient = createClerkClient({ secretKey: import.meta.env.CLERK_SECRET_KEY }) - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object diff --git a/docs/guides/configure/auth-strategies/social-connections/overview.mdx b/docs/guides/configure/auth-strategies/social-connections/overview.mdx index 9283a8377e..cee32f922c 100644 --- a/docs/guides/configure/auth-strategies/social-connections/overview.mdx +++ b/docs/guides/configure/auth-strategies/social-connections/overview.mdx @@ -74,7 +74,7 @@ Use the following tabs to see how to add additional OAuth scopes to the ` - To use the Backend SDK to create an invitation, see the [`createOrganizationInvitation()`](/docs/references/backend/organization/create-organization-invitation) reference documentation. + To use the JS Backend SDK to create an invitation, see the [`createOrganizationInvitation()`](/docs/references/backend/organization/create-organization-invitation) reference documentation. @@ -111,7 +111,7 @@ To revoke an invitation client-side, see the [dedicated guide](/docs/guides/deve ### Server-side -To revoke an invitation server-side, use the [Backend API](/docs/reference/backend-api/tag/organization-invitations/post/organizations/\{organization_id}/invitations/\{invitation_id}/revoke){{ target: '_blank' }}. either by using a cURL command or the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart). The JavaScript Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. +To revoke an invitation server-side, use the [Backend API](/docs/reference/backend-api/tag/organization-invitations/post/organizations/\{organization_id}/invitations/\{invitation_id}/revoke){{ target: '_blank' }}. either by using a cURL command or the [JS Backend SDK](/docs/js-backend/getting-started/quickstart). The JS Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. Use the following tabs to see examples for each method. @@ -141,6 +141,6 @@ Use the following tabs to see examples for each method. - To use the Backend SDK to revoke an organization invitation, see the [`revokeOrganizationInvitation()`](/docs/references/backend/organization/revoke-organization-invitation) reference documentation. + To use the JS Backend SDK to revoke an organization invitation, see the [`revokeOrganizationInvitation()`](/docs/references/backend/organization/revoke-organization-invitation) reference documentation. diff --git a/docs/guides/organizations/metadata.mdx b/docs/guides/organizations/metadata.mdx index 475c7f3da3..64dff69181 100644 --- a/docs/guides/organizations/metadata.mdx +++ b/docs/guides/organizations/metadata.mdx @@ -30,7 +30,7 @@ There are two ways to set organization metadata: 1. Select the organization you want to update. 1. In the **Organization metadata** section, select **Edit** next to the metadata you want to update. -### Using the Backend SDK +### Using the JS Backend SDK To ease the flow of setting metadata, Clerk provides the `updateOrganizationMetadata()` and `updateOrganizationMembershipMetadata()` methods from the [Backend SDK](/docs/js-backend/getting-started/quickstart), which is a wrapper around the [Backend API](/docs/reference/backend-api){{ target: '_blank' }}. diff --git a/docs/guides/secure/basic-rbac.mdx b/docs/guides/secure/basic-rbac.mdx index 0df4cb6629..608a87ba1a 100644 --- a/docs/guides/secure/basic-rbac.mdx +++ b/docs/guides/secure/basic-rbac.mdx @@ -151,7 +151,7 @@ This guide assumes that you're using Next.js App Router, but the concepts can be ## Create server actions for managing a user's role - 1. In your `app/admin/` directory, create an `_actions.ts` file with the following code. The `setRole()` action checks that the current user has the `admin` role before updating the specified user's role using Clerk's [JavaScript Backend SDK](/docs/references/backend/user/update-user). The `removeRole()` action removes the role from the specified user. + 1. In your `app/admin/` directory, create an `_actions.ts` file with the following code. The `setRole()` action checks that the current user has the `admin` role before updating the specified user's role using Clerk's [JS Backend SDK](/docs/references/backend/user/update-user). The `removeRole()` action removes the role from the specified user. ```ts {{ filename: 'app/admin/_actions.ts' }} 'use server' diff --git a/docs/guides/sessions/force-token-refresh.mdx b/docs/guides/sessions/force-token-refresh.mdx index 6bb681f3e3..32996e18f3 100644 --- a/docs/guides/sessions/force-token-refresh.mdx +++ b/docs/guides/sessions/force-token-refresh.mdx @@ -38,7 +38,7 @@ To do so, follow the [guide on customizing your session token](/docs/guides/sess - The `/update-user-metadata` API route uses Clerk's [`updateUserMetadata()`](/docs/references/backend/user/update-user-metadata) method from the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) to update the user's birthday metadata. + The `/update-user-metadata` API route uses Clerk's [`updateUserMetadata()`](/docs/references/backend/user/update-user-metadata) method from the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) to update the user's birthday metadata. ```ts {{ filename: 'app/api/update-user-metadata/route.ts', collapsible: true }} import { auth, clerkClient } from '@clerk/nextjs/server' @@ -61,7 +61,7 @@ To do so, follow the [guide on customizing your session token](/docs/guides/sess // such as the `users` resource, which includes methods for managing users const client = await clerkClient() - // Use the Backend SDK's `updateUserMetadata()` method to update the user's birthday + // Use the JS Backend SDK's `updateUserMetadata()` method to update the user's birthday await client.users.updateUserMetadata(userId, { publicMetadata: { birthday, diff --git a/docs/guides/sessions/manual-jwt-verification.mdx b/docs/guides/sessions/manual-jwt-verification.mdx index 4d20d577f1..9e9ffff828 100644 --- a/docs/guides/sessions/manual-jwt-verification.mdx +++ b/docs/guides/sessions/manual-jwt-verification.mdx @@ -5,11 +5,11 @@ description: Learn how to manually verify Clerk-generated session tokens (JWTs). Your Clerk-generated [session tokens](/docs/guides/sessions/session-tokens) are essentially JWTs which are signed using your instance's private key and can be verified using your instance's public key. Depending on your architecture, these tokens will be in your backend requests either via a cookie named `__session` or via the Authorization header. -For every request, you must validate the token to ensure it hasn't expired or been tampered with (i.e., it's authentic and secure). If these validations succeed, then the user is authenticated to your application and should be considered signed in. The `authenticateRequest()` method from the JavaScript Backend SDK handles these validations for you. Alternatively, you can manually verify the token without using the SDK. See the following sections for more information. +For every request, you must validate the token to ensure it hasn't expired or been tampered with (i.e., it's authentic and secure). If these validations succeed, then the user is authenticated to your application and should be considered signed in. The `authenticateRequest()` method from the JS Backend SDK handles these validations for you. Alternatively, you can manually verify the token without using the SDK. See the following sections for more information. ## Use `authenticateRequest()` to verify a session token -The [`authenticateRequest()`](/docs/references/backend/authenticate-request) method from the JavaScript Backend SDK accepts the `request` object and authenticates the session token in it. +The [`authenticateRequest()`](/docs/references/backend/authenticate-request) method from the JS Backend SDK accepts the `request` object and authenticates the session token in it. The following example uses the `authenticateRequest()` method to verify the session token. It also performs networkless authentication by passing `jwtKey`. This verifies if the user is signed into the application. For more information, including usage with higher-level SDKs, see the [`authenticateRequest()` reference](/docs/references/backend/authenticate-request). diff --git a/docs/guides/sessions/session-tokens.mdx b/docs/guides/sessions/session-tokens.mdx index 346ab508ed..e3e96e0a36 100644 --- a/docs/guides/sessions/session-tokens.mdx +++ b/docs/guides/sessions/session-tokens.mdx @@ -167,7 +167,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin const client = await clerkClient() - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await client.users.getUser(userId) // Return the Backend User object @@ -192,7 +192,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin return new Response('Unauthorized', { status: 401 }) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient(context).users.getUser(userId) // Return the Backend User object @@ -218,7 +218,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin res.status(401).json({ error: 'User not authenticated' }) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object @@ -243,7 +243,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -272,7 +272,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin return redirect('/sign-in?redirect_url=' + args.request.url) } - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -299,7 +299,7 @@ Then, when you need to access the other metadata fields, you can fetch them usin // Prepare the data for the mutation const params = { firstName: 'John', lastName: 'Wicker' } - // // Use the Backend SDK's `updateUser()` method to update the Backend User object + // // Use the JS Backend SDK's `updateUser()` method to update the Backend User object const updatedUser = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, }).users.updateUser(userId, params) @@ -328,10 +328,10 @@ Then, when you need to access the other metadata fields, you can fetch them usin return json({ error: 'Unauthorized' }, { status: 401 }) } - // Instantiate the Backend SDK + // Instantiate the JS Backend SDK const clerkClient = createClerkClient({ secretKey: import.meta.env.CLERK_SECRET_KEY }) - // Use the Backend SDK's `getUser()` method to get the Backend User object + // Use the JS Backend SDK's `getUser()` method to get the Backend User object const user = await clerkClient.users.getUser(userId) // Return the Backend User object diff --git a/docs/guides/users/extending.mdx b/docs/guides/users/extending.mdx index da97739880..e3678a8d82 100644 --- a/docs/guides/users/extending.mdx +++ b/docs/guides/users/extending.mdx @@ -120,7 +120,7 @@ There are multiple ways to retrieve public metadata. On the frontend, it's available on the [`User`](/docs/references/javascript/user) object, which can be accessed using the [`useUser()`](/docs/references/hooks/use-user) hook. -On the backend, it's available on the [Backend `User`](/docs/references/backend/types/backend-user) object which can be accessed using the JavaScript Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the public metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so _if you are retrieving the metadata frequently_, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). +On the backend, it's available on the [Backend `User`](/docs/references/backend/types/backend-user) object which can be accessed using the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the public metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so _if you are retrieving the metadata frequently_, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). ### Private metadata @@ -240,7 +240,7 @@ Private metadata is only accessible by the backend, which makes this useful for #### Retrieve private metadata -You can retrieve the private metadata for a user by using the JavaScript Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the private metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so if you are retrieving the metadata frequently, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). +You can retrieve the private metadata for a user by using the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the private metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so if you are retrieving the metadata frequently, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). @@ -527,7 +527,7 @@ There are multiple ways to retrieve unsafe metadata. On the frontend, it's available on the [`User`](/docs/references/javascript/user) object, which can be accessed using the [`useUser()`](/docs/references/hooks/use-user) hook. -On the backend, it's available on the [Backend `User`](/docs/references/backend/types/backend-user) object which can be accessed using the JavaScript Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the unsafe metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so if you are retrieving the metadata frequently, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). +On the backend, it's available on the [Backend `User`](/docs/references/backend/types/backend-user) object which can be accessed using the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user) method. This method will return the `User` object which contains the unsafe metadata. However, this method is subject to [rate limits](/docs/guides/how-clerk-works/system-limits#backend-api-requests), so if you are retrieving the metadata frequently, it's recommended to [attach it to the user's session token](#metadata-in-the-session-token). ## Metadata in the session token diff --git a/docs/guides/users/inviting.mdx b/docs/guides/users/inviting.mdx index f3d87625ec..fb89763d8b 100644 --- a/docs/guides/users/inviting.mdx +++ b/docs/guides/users/inviting.mdx @@ -25,7 +25,7 @@ To invite users, navigate to the **Users** page from the top-level menu, then se ### Using Backend API -You can either use a cURL command or the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) to create an invitation. Clerk's JavaScript Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. Use the following tabs to see examples for each method. +You can either use a cURL command or the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) to create an invitation. Clerk's JS Backend SDK is a wrapper around the Backend API that makes it easier to interact with the API. Use the following tabs to see examples for each method. @@ -45,7 +45,7 @@ You can either use a cURL command or the [JavaScript Backend SDK](/docs/js-backe - To use the Backend SDK to create an invitation, see the [`createInvitation()` reference](/docs/references/backend/invitations/create-invitation). + To use the JS Backend SDK to create an invitation, see the [`createInvitation()` reference](/docs/references/backend/invitations/create-invitation). @@ -101,7 +101,7 @@ To revoke an invitation, navigate to the **Users** page from the top-level menu, ### Using Backend API -You can either use a cURL command or the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) to revoke an invitation. Use the following tabs to see examples for each method. +You can either use a cURL command or the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) to revoke an invitation. Use the following tabs to see examples for each method. @@ -121,7 +121,7 @@ You can either use a cURL command or the [JavaScript Backend SDK](/docs/js-backe - To use the Backend SDK to revoke an invitation, see the [`revokeInvitation()`](/docs/references/backend/invitations/revoke-invitation) reference documentation. + To use the JS Backend SDK to revoke an invitation, see the [`revokeInvitation()`](/docs/references/backend/invitations/revoke-invitation) reference documentation. diff --git a/docs/guides/users/managing.mdx b/docs/guides/users/managing.mdx index 94d8b1542c..744cfb3d67 100644 --- a/docs/guides/users/managing.mdx +++ b/docs/guides/users/managing.mdx @@ -31,7 +31,7 @@ Depending on the level of abstraction you need, you can manage users in the fron #### In the backend -The [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments. +The [JS Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments. There are many operations available for managing users, such as `getUser()`, `createUser()`, and `deleteUser()`. For more information, see the [Backend SDK reference docs](/docs/js-backend/getting-started/quickstart). @@ -53,13 +53,13 @@ You can create users in your app using Clerk's Backend API. Use the following tabs to see examples of how to create users using one of the following: -- Backend SDK +- JS Backend SDK - Express - cURL - + - The following example shows how to create a user using the JavaScript Backend SDK's [`createUser()`](/docs/references/backend/user/create-user) method from the `users` sub-api of the `clerkClient` instance. + The following example shows how to create a user using the JS Backend SDK's [`createUser()`](/docs/references/backend/user/create-user) method from the `users` sub-api of the `clerkClient` instance. @@ -134,13 +134,13 @@ You can delete users in your app using Clerk's Backend API. Use the following tabs to see examples of how to delete users using one of the following: -- Backend SDK +- JS Backend SDK - Express - cURL - + - The following example shows how to delete a user using the JavaScript Backend SDK's [`deleteUser()`](/docs/references/backend/user/delete-user) method from the `users` sub-api of the `clerkClient` instance. + The following example shows how to delete a user using the JS Backend SDK's [`deleteUser()`](/docs/references/backend/user/delete-user) method from the `users` sub-api of the `clerkClient` instance. diff --git a/docs/guides/users/reading.mdx b/docs/guides/users/reading.mdx index b8883141e7..7c98ee5404 100644 --- a/docs/guides/users/reading.mdx +++ b/docs/guides/users/reading.mdx @@ -74,7 +74,7 @@ For Next.js applications using the Pages Router, the [`getAuth()`](/docs/referen In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. -The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. +The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. In the following example, the `userId` is passed to the Backend SDK's `getUser()` method to get the user's full `Backend User` object. diff --git a/docs/guides/users/reading.nuxt.mdx b/docs/guides/users/reading.nuxt.mdx index d1ca36581f..1751b90e2f 100644 --- a/docs/guides/users/reading.nuxt.mdx +++ b/docs/guides/users/reading.nuxt.mdx @@ -36,9 +36,9 @@ const { isLoaded, isSignedIn, user } = useUser() The `Auth` object is available at `event.context.auth()` in your [event handlers](https://h3.unjs.io/guide/event-handler). This JavaScript object contains important authentication information like the current user's session ID, user ID, and organization ID, and an `isAuthenticated` property to protect your API routes from unauthenticated users. -In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user){{ target: '_blank' }} object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart){{ target: '_blank' }}, which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. +In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user){{ target: '_blank' }} object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart){{ target: '_blank' }}, which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. -The following example uses the `Auth` object to access the `userId` and `isAuthenticated` properties. The `userId` is passed to the Backend SDK's `getUser()` method to get the user's full `Backend User` object. +The following example uses the `Auth` object to access the `userId` and `isAuthenticated` properties. The `userId` is passed to the JS Backend SDK's `getUser()` method to get the user's full `Backend User` object. ```ts {{ filename: 'server/api/auth/index.ts' }} import { clerkClient } from '@clerk/nuxt/server' diff --git a/docs/guides/users/reading.react-router.mdx b/docs/guides/users/reading.react-router.mdx index 92cef49532..56fab53874 100644 --- a/docs/guides/users/reading.react-router.mdx +++ b/docs/guides/users/reading.react-router.mdx @@ -14,9 +14,9 @@ To access active session and user data on the server-side, use the [`getAuth()`] The [`getAuth()`](/docs/references/tanstack-react-start/get-auth) helper returns the [`Auth`](/docs/references/backend/types/auth-object) object of the currently active user, which contains important information like the current user's session ID, user ID, and organization ID, and the `isAuthenticated` property, which can be used to protect your API routes. -In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. +In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. -In the following example, the `userId` is passed to the Backend SDK's `getUser()` method to get the user's full `Backend User` object. +In the following example, the `userId` is passed to the JS Backend SDK's `getUser()` method to get the user's full `Backend User` object. ```tsx {{ filename: 'app/routes/profile.tsx' }} import { redirect } from 'react-router' @@ -33,7 +33,7 @@ export async function loader(args: Route.LoaderArgs) { return redirect('/sign-in?redirect_url=' + args.request.url) } - // Instantiate the Backend SDK and get the user's full `Backend User` object + // Instantiate the JS Backend SDK and get the user's full `Backend User` object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -78,7 +78,7 @@ export async function action(args: Route.ActionArgs) { const formData = await args.request.formData() const name = formData.get('name')?.toString() - // Instantiate the Backend SDK and get the user's full `Backend User` object + // Instantiate the JS Backend SDK and get the user's full `Backend User` object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, }).users.getUser(userId) diff --git a/docs/guides/users/reading.remix.mdx b/docs/guides/users/reading.remix.mdx index e101c11e6b..2bcf6ee196 100644 --- a/docs/guides/users/reading.remix.mdx +++ b/docs/guides/users/reading.remix.mdx @@ -14,7 +14,7 @@ Clerk provides a set of [hooks and helpers](/docs/references/remix/overview) tha The [`getAuth()`](/docs/references/remix/overview#get-auth) helper allows you to access the [`Auth` object](/docs/references/backend/types/auth-object){{ target: '_blank' }}, which includes the current user's `userId` and the `isAuthenticated` property, which can be used to protect your routes. -In the following example, the `userId` is passed to the Backend SDK's [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method to get the user's full `User` object. For information on how to use the Backend SDK, see the [Backend SDK documentation](/docs/js-backend/getting-started/quickstart){{ target: '_blank' }}. +In the following example, the `userId` is passed to the JS Backend SDK's [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method to get the user's full `User` object. For information on how to use the JS Backend SDK, see the [Backend SDK documentation](/docs/js-backend/getting-started/quickstart){{ target: '_blank' }}. @@ -32,7 +32,7 @@ In the following example, the `userId` is passed to the Backend SDK's [`getUser( return redirect('/sign-in?redirect_url=' + args.request.url) } - // Initialize the Backend SDK and get the user's full `Backend User` object + // Initialize the JS Backend SDK and get the user's full `Backend User` object const user = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY }).users.getUser( userId, ) @@ -58,7 +58,7 @@ In the following example, the `userId` is passed to the Backend SDK's [`getUser( return redirect('/sign-in?redirect_url=' + args.request.url) } - // Initialize the Backend SDK and get the user's full `Backend User` object + // Initialize the SBackend SDK and get the user's full `Backend User` object const updatedUser = await createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, }).users.getUser(userId) diff --git a/docs/guides/users/reading.tanstack-react-start.mdx b/docs/guides/users/reading.tanstack-react-start.mdx index f2bfbdc571..04b6086287 100644 --- a/docs/guides/users/reading.tanstack-react-start.mdx +++ b/docs/guides/users/reading.tanstack-react-start.mdx @@ -10,9 +10,9 @@ Clerk provides a set of [hooks and helpers](/docs/references/tanstack-react-star The [`getAuth()`](/docs/references/tanstack-react-start/get-auth) helper returns the [`Auth`](/docs/references/backend/types/auth-object) object of the currently active user, which contains important information like the current user's session ID, user ID, and organization ID, and the `isAuthenticated` property, which can be used to protect your API routes. -In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. +In some cases, you may need the full [`Backend User`](/docs/references/backend/types/backend-user) object of the currently active user. This is helpful if you want to render information, like their first and last name, directly from the server. The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart), which exposes Clerk's Backend API resources through methods such as the [`getUser()`](/docs/references/backend/user/get-user){{ target: '_blank' }} method. This method returns the full `Backend User` object. -In the following example, the `userId` is passed to the Backend SDK's `getUser()` method to get the user's full `Backend User` object. +In the following example, the `userId` is passed to the JS Backend SDK's `getUser()` method to get the user's full `Backend User` object. diff --git a/docs/index.mdx b/docs/index.mdx index 59fc01dc17..8495ea3b3e 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -118,7 +118,7 @@ Find all the guides and resources you need to develop with Clerk. - [JS Backend SDK](/docs/js-backend/getting-started/quickstart) - - The Clerk Backend SDK exposes our Backend API resources and low-level authentication utilities for JavaScript environments. + - The JavaScript Backend SDK exposes our Backend API resources and low-level authentication utilities for JavaScript environments. - --- diff --git a/docs/references/astro/overview.mdx b/docs/references/astro/overview.mdx index 5f456d1bf8..05fecdacd7 100644 --- a/docs/references/astro/overview.mdx +++ b/docs/references/astro/overview.mdx @@ -44,7 +44,7 @@ The `clerkMiddleware()` helper integrates Clerk authentication and authorization ### `clerkClient()` -[Clerk's JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JavaScript Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint. +[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint. All resource operations are mounted as sub-APIs on the `clerkClient` object. See the [reference documentation](/docs/js-backend/getting-started/quickstart#usage){{ target: '_blank' }} for more information. diff --git a/docs/references/backend/allowlist/create-allowlist-identifier.mdx b/docs/references/backend/allowlist/create-allowlist-identifier.mdx index 8456c6f45f..65879877d4 100644 --- a/docs/references/backend/allowlist/create-allowlist-identifier.mdx +++ b/docs/references/backend/allowlist/create-allowlist-identifier.mdx @@ -1,6 +1,6 @@ --- title: '`createAllowlistIdentifier()`' -description: Use Clerk's Backend SDK to add a new identifier to the allowlist. +description: Use Clerk's JS Backend SDK to add a new identifier to the allowlist. sdk: js-backend --- diff --git a/docs/references/backend/allowlist/delete-allowlist-identifier.mdx b/docs/references/backend/allowlist/delete-allowlist-identifier.mdx index e9f7ea96f0..6191c73dc6 100644 --- a/docs/references/backend/allowlist/delete-allowlist-identifier.mdx +++ b/docs/references/backend/allowlist/delete-allowlist-identifier.mdx @@ -1,6 +1,6 @@ --- title: '`deleteAllowlistIdentifier()`' -description: Use Clerk's Backend SDK to delete an allowlist identifier. +description: Use Clerk's JS Backend SDK to delete an allowlist identifier. sdk: js-backend --- diff --git a/docs/references/backend/allowlist/get-allowlist-identifier-list.mdx b/docs/references/backend/allowlist/get-allowlist-identifier-list.mdx index e3527f7869..f035d99bae 100644 --- a/docs/references/backend/allowlist/get-allowlist-identifier-list.mdx +++ b/docs/references/backend/allowlist/get-allowlist-identifier-list.mdx @@ -1,6 +1,6 @@ --- title: '`getAllowlistIdentifierList()`' -description: Use Clerk's Backend SDK to retrieve a list of allowlist identifiers. +description: Use Clerk's JS Backend SDK to retrieve a list of allowlist identifiers. sdk: js-backend --- diff --git a/docs/references/backend/authenticate-request.mdx b/docs/references/backend/authenticate-request.mdx index 59fe6b38c6..2aebc1e1be 100644 --- a/docs/references/backend/authenticate-request.mdx +++ b/docs/references/backend/authenticate-request.mdx @@ -1,6 +1,6 @@ --- title: '`authenticateRequest()`' -description: Use Clerk's Backend SDK to verify a token passed from the frontend. +description: Use Clerk's JS Backend SDK to verify a token passed from the frontend. sdk: js-backend --- @@ -111,7 +111,7 @@ It is recommended to set these options as [environment variables](/docs/guides/d - If you are using the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) on its own, you need to provide the `secretKey` and `publishableKey` to `createClerkClient()` so that it is passed to `authenticateRequest()`. You can set these values as [environment variables](/docs/guides/development/clerk-environment-variables#clerk-publishable-and-secret-keys) and then pass them to the function. + If you are using the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) on its own, you need to provide the `secretKey` and `publishableKey` to `createClerkClient()` so that it is passed to `authenticateRequest()`. You can set these values as [environment variables](/docs/guides/development/clerk-environment-variables#clerk-publishable-and-secret-keys) and then pass them to the function. ```tsx import { createClerkClient } from '@clerk/backend' @@ -193,6 +193,6 @@ export async function GET(request: Request) { {/* Note: this example is duped from /authenticate-request. Probably a good opportunity to use a partial here */} -The following example uses the `authenticateRequest()` method with the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) to verify the token passed by the frontend, and performs a networkless authentication by passing `jwtKey`. This will verify if the user is signed into the application or not. +The following example uses the `authenticateRequest()` method with the [JS Backend SDK](/docs/js-backend/getting-started/quickstart) to verify the token passed by the frontend, and performs a networkless authentication by passing `jwtKey`. This will verify if the user is signed into the application or not. diff --git a/docs/references/backend/billing/cancel-subscription-item.mdx b/docs/references/backend/billing/cancel-subscription-item.mdx index 4036fc44e5..01baba6a1f 100644 --- a/docs/references/backend/billing/cancel-subscription-item.mdx +++ b/docs/references/backend/billing/cancel-subscription-item.mdx @@ -1,6 +1,6 @@ --- title: '`cancelSubscriptionItem()`' -description: Use Clerk's Backend SDK to cancel a subscription item. +description: Use Clerk's JS Backend SDK to cancel a subscription item. sdk: js-backend --- diff --git a/docs/references/backend/billing/get-organization-billing-subscription.mdx b/docs/references/backend/billing/get-organization-billing-subscription.mdx index 9fb402b632..a2a17c0acd 100644 --- a/docs/references/backend/billing/get-organization-billing-subscription.mdx +++ b/docs/references/backend/billing/get-organization-billing-subscription.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationBillingSubscription()`' -description: Use Clerk's Backend SDK to retrieve an organization's billing subscription. +description: Use Clerk's JS Backend SDK to retrieve an organization's billing subscription. sdk: js-backend --- diff --git a/docs/references/backend/billing/get-plan-list.mdx b/docs/references/backend/billing/get-plan-list.mdx index f0348f2001..bfede895e7 100644 --- a/docs/references/backend/billing/get-plan-list.mdx +++ b/docs/references/backend/billing/get-plan-list.mdx @@ -1,6 +1,6 @@ --- title: '`getPlanList()`' -description: Use Clerk's Backend SDK to retrieve a list of billing plans. +description: Use Clerk's JS Backend SDK to retrieve a list of billing plans. sdk: js-backend --- diff --git a/docs/references/backend/billing/get-user-billing-subscription.mdx b/docs/references/backend/billing/get-user-billing-subscription.mdx index d97e6768d8..dda986843e 100644 --- a/docs/references/backend/billing/get-user-billing-subscription.mdx +++ b/docs/references/backend/billing/get-user-billing-subscription.mdx @@ -1,6 +1,6 @@ --- title: '`getUserBillingSubscription()`' -description: Use Clerk's Backend SDK to retrieve a user's billing subscription. +description: Use Clerk's JS Backend SDK to retrieve a user's billing subscription. sdk: js-backend --- diff --git a/docs/references/backend/client/get-client.mdx b/docs/references/backend/client/get-client.mdx index a12b2982aa..86b20f19b4 100644 --- a/docs/references/backend/client/get-client.mdx +++ b/docs/references/backend/client/get-client.mdx @@ -1,6 +1,6 @@ --- title: '`getClient()`' -description: Use Clerk's Backend SDK to retrieve a single client by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single client by its ID. sdk: js-backend --- diff --git a/docs/references/backend/client/verify-client.mdx b/docs/references/backend/client/verify-client.mdx index 30327f5741..69cf21d331 100644 --- a/docs/references/backend/client/verify-client.mdx +++ b/docs/references/backend/client/verify-client.mdx @@ -1,6 +1,6 @@ --- title: '`verifyClient()`' -description: Use Clerk's Backend SDK to retrieve a client for a given session token, if the session is active. +description: Use Clerk's JS Backend SDK to retrieve a client for a given session token, if the session is active. sdk: js-backend --- diff --git a/docs/references/backend/domains/delete-domain.mdx b/docs/references/backend/domains/delete-domain.mdx index d40c117fab..83a5b26520 100644 --- a/docs/references/backend/domains/delete-domain.mdx +++ b/docs/references/backend/domains/delete-domain.mdx @@ -1,6 +1,6 @@ --- title: '`deleteDomain()`' -description: Use Clerk's Backend SDK to delete a satellite domain for the instance. +description: Use Clerk's JS Backend SDK to delete a satellite domain for the instance. sdk: js-backend --- diff --git a/docs/references/backend/email-addresses/create-email-address.mdx b/docs/references/backend/email-addresses/create-email-address.mdx index 1fc754118d..d6c9b73ecc 100644 --- a/docs/references/backend/email-addresses/create-email-address.mdx +++ b/docs/references/backend/email-addresses/create-email-address.mdx @@ -1,6 +1,6 @@ --- title: '`createEmailAddress()`' -description: Use Clerk's Backend SDK to create an email address for the specified user. +description: Use Clerk's JS Backend SDK to create an email address for the specified user. sdk: js-backend --- diff --git a/docs/references/backend/email-addresses/delete-email-address.mdx b/docs/references/backend/email-addresses/delete-email-address.mdx index 81e06faa3d..15caf4427e 100644 --- a/docs/references/backend/email-addresses/delete-email-address.mdx +++ b/docs/references/backend/email-addresses/delete-email-address.mdx @@ -1,6 +1,6 @@ --- title: '`deleteEmailAddress()`' -description: Use Clerk's Backend SDK to delete an email address. +description: Use Clerk's JS Backend SDK to delete an email address. sdk: js-backend --- diff --git a/docs/references/backend/email-addresses/get-email-address.mdx b/docs/references/backend/email-addresses/get-email-address.mdx index 983ff1933b..6371d676aa 100644 --- a/docs/references/backend/email-addresses/get-email-address.mdx +++ b/docs/references/backend/email-addresses/get-email-address.mdx @@ -1,6 +1,6 @@ --- title: '`getEmailAddress()`' -description: Use Clerk's Backend SDK to retrieve a single email address by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single email address by its ID. sdk: js-backend --- diff --git a/docs/references/backend/email-addresses/update-email-address.mdx b/docs/references/backend/email-addresses/update-email-address.mdx index 8370a14e08..d28790acae 100644 --- a/docs/references/backend/email-addresses/update-email-address.mdx +++ b/docs/references/backend/email-addresses/update-email-address.mdx @@ -1,6 +1,6 @@ --- title: '`updateEmailAddress()`' -description: Use Clerk's Backend SDK to update an email address. +description: Use Clerk's JS Backend SDK to update an email address. sdk: js-backend --- diff --git a/docs/references/backend/invitations/create-invitation.mdx b/docs/references/backend/invitations/create-invitation.mdx index a5bf7d21ea..855e206ea9 100644 --- a/docs/references/backend/invitations/create-invitation.mdx +++ b/docs/references/backend/invitations/create-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`createInvitation()`' -description: Use Clerk's Backend SDK to create a new invitation for the given email address, and send the invitation email. +description: Use Clerk's JS Backend SDK to create a new invitation for the given email address, and send the invitation email. sdk: js-backend --- diff --git a/docs/references/backend/invitations/get-invitation-list.mdx b/docs/references/backend/invitations/get-invitation-list.mdx index 1b6226d99c..18d20cd675 100644 --- a/docs/references/backend/invitations/get-invitation-list.mdx +++ b/docs/references/backend/invitations/get-invitation-list.mdx @@ -1,6 +1,6 @@ --- title: '`getInvitationList()`' -description: Use Clerk's Backend SDK to retrieve a list of non-revoked invitations for your application. +description: Use Clerk's JS Backend SDK to retrieve a list of non-revoked invitations for your application. sdk: js-backend --- diff --git a/docs/references/backend/invitations/revoke-invitation.mdx b/docs/references/backend/invitations/revoke-invitation.mdx index 2bbcbbaa99..23f83afbf2 100644 --- a/docs/references/backend/invitations/revoke-invitation.mdx +++ b/docs/references/backend/invitations/revoke-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`revokeInvitation()`' -description: Use Clerk's Backend SDK to revoke an invitation. +description: Use Clerk's JS Backend SDK to revoke an invitation. sdk: js-backend --- diff --git a/docs/references/backend/m2m-tokens/create-token.mdx b/docs/references/backend/m2m-tokens/create-token.mdx index d713a89543..2bf128b1ba 100644 --- a/docs/references/backend/m2m-tokens/create-token.mdx +++ b/docs/references/backend/m2m-tokens/create-token.mdx @@ -1,6 +1,6 @@ --- title: '`createToken()`' -description: Use Clerk's Backend SDK to create a M2M token. +description: Use Clerk's JS Backend SDK to create a M2M token. sdk: js-backend --- diff --git a/docs/references/backend/m2m-tokens/revoke-token.mdx b/docs/references/backend/m2m-tokens/revoke-token.mdx index 6b670d61ed..cfc7446f02 100644 --- a/docs/references/backend/m2m-tokens/revoke-token.mdx +++ b/docs/references/backend/m2m-tokens/revoke-token.mdx @@ -1,6 +1,6 @@ --- title: '`revokeToken()`' -description: Use Clerk's Backend SDK to revoke a M2M token. +description: Use Clerk's JS Backend SDK to revoke a M2M token. sdk: js-backend --- diff --git a/docs/references/backend/m2m-tokens/verify-token.mdx b/docs/references/backend/m2m-tokens/verify-token.mdx index c92dea364f..c7657049b2 100644 --- a/docs/references/backend/m2m-tokens/verify-token.mdx +++ b/docs/references/backend/m2m-tokens/verify-token.mdx @@ -1,6 +1,6 @@ --- title: '`verifyToken()`' -description: Use Clerk's Backend SDK to verify a M2M token. +description: Use Clerk's JS Backend SDK to verify a M2M token. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/create.mdx b/docs/references/backend/oauth-applications/create.mdx index a31e7fa389..a4de1715cc 100644 --- a/docs/references/backend/oauth-applications/create.mdx +++ b/docs/references/backend/oauth-applications/create.mdx @@ -1,6 +1,6 @@ --- title: '`create()`' -description: Use Clerk's Backend SDK to create an OAuth application. +description: Use Clerk's JS Backend SDK to create an OAuth application. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/delete.mdx b/docs/references/backend/oauth-applications/delete.mdx index 3e718d9be0..a3c44c5f0e 100644 --- a/docs/references/backend/oauth-applications/delete.mdx +++ b/docs/references/backend/oauth-applications/delete.mdx @@ -1,6 +1,6 @@ --- title: '`delete()`' -description: Use Clerk's Backend SDK to delete an OAuth application. +description: Use Clerk's JS Backend SDK to delete an OAuth application. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/get.mdx b/docs/references/backend/oauth-applications/get.mdx index 7c56f9d235..6c323d09b0 100644 --- a/docs/references/backend/oauth-applications/get.mdx +++ b/docs/references/backend/oauth-applications/get.mdx @@ -1,6 +1,6 @@ --- title: '`get()`' -description: Use Clerk's Backend SDK to retrieve an OAuth application. +description: Use Clerk's JS Backend SDK to retrieve an OAuth application. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/list.mdx b/docs/references/backend/oauth-applications/list.mdx index aa5e76c6c3..6e0ba191ac 100644 --- a/docs/references/backend/oauth-applications/list.mdx +++ b/docs/references/backend/oauth-applications/list.mdx @@ -1,6 +1,6 @@ --- title: '`list()`' -description: Use Clerk's Backend SDK to retrieve a list of OAuth applications for an instance. +description: Use Clerk's JS Backend SDK to retrieve a list of OAuth applications for an instance. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/rotate-secret.mdx b/docs/references/backend/oauth-applications/rotate-secret.mdx index 49902a2d34..94499fc340 100644 --- a/docs/references/backend/oauth-applications/rotate-secret.mdx +++ b/docs/references/backend/oauth-applications/rotate-secret.mdx @@ -1,6 +1,6 @@ --- title: '`rotateSecret()`' -description: Use Clerk's Backend SDK to rotate the OAuth application's client secret. +description: Use Clerk's JS Backend SDK to rotate the OAuth application's client secret. sdk: js-backend --- diff --git a/docs/references/backend/oauth-applications/update.mdx b/docs/references/backend/oauth-applications/update.mdx index b18338e519..93695362fe 100644 --- a/docs/references/backend/oauth-applications/update.mdx +++ b/docs/references/backend/oauth-applications/update.mdx @@ -1,6 +1,6 @@ --- title: '`update()`' -description: Use Clerk's Backend SDK to update an OAuth application. +description: Use Clerk's JS Backend SDK to update an OAuth application. sdk: js-backend --- diff --git a/docs/references/backend/organization/create-organization-invitation-bulk.mdx b/docs/references/backend/organization/create-organization-invitation-bulk.mdx index c5a4f00c96..e7d33229c0 100644 --- a/docs/references/backend/organization/create-organization-invitation-bulk.mdx +++ b/docs/references/backend/organization/create-organization-invitation-bulk.mdx @@ -1,6 +1,6 @@ --- title: '`createOrganizationInvitationBulk()`' -description: Use Clerk's Backend SDK to create multiple invitations for new users to join an organization. +description: Use Clerk's JS Backend SDK to create multiple invitations for new users to join an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/create-organization-invitation.mdx b/docs/references/backend/organization/create-organization-invitation.mdx index 9a2b129ff5..3f577e6b2e 100644 --- a/docs/references/backend/organization/create-organization-invitation.mdx +++ b/docs/references/backend/organization/create-organization-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`createOrganizationInvitation()`' -description: Use Clerk's Backend SDK to create an invitation for new users to join an organization. +description: Use Clerk's JS Backend SDK to create an invitation for new users to join an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/create-organization-membership.mdx b/docs/references/backend/organization/create-organization-membership.mdx index 8faa6e99b7..36093c87e0 100644 --- a/docs/references/backend/organization/create-organization-membership.mdx +++ b/docs/references/backend/organization/create-organization-membership.mdx @@ -1,6 +1,6 @@ --- title: '`createOrganizationMembership()`' -description: Use Clerk's Backend SDK to create a membership to an organization for a user directly (circumventing the need for an invitation). +description: Use Clerk's JS Backend SDK to create a membership to an organization for a user directly (circumventing the need for an invitation). sdk: js-backend --- diff --git a/docs/references/backend/organization/create-organization.mdx b/docs/references/backend/organization/create-organization.mdx index cf77e70164..14918c0dfc 100644 --- a/docs/references/backend/organization/create-organization.mdx +++ b/docs/references/backend/organization/create-organization.mdx @@ -1,6 +1,6 @@ --- title: '`createOrganization()`' -description: Use Clerk's Backend SDK to create an organization. +description: Use Clerk's JS Backend SDK to create an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/delete-organization-logo.mdx b/docs/references/backend/organization/delete-organization-logo.mdx index 73860476eb..5e4c36089f 100644 --- a/docs/references/backend/organization/delete-organization-logo.mdx +++ b/docs/references/backend/organization/delete-organization-logo.mdx @@ -1,6 +1,6 @@ --- title: '`deleteOrganizationLogo()`' -description: Use Clerk's Backend SDK to delete an organization's logo. +description: Use Clerk's JS Backend SDK to delete an organization's logo. sdk: js-backend --- diff --git a/docs/references/backend/organization/delete-organization-membership.mdx b/docs/references/backend/organization/delete-organization-membership.mdx index 594871279a..a6a5801a16 100644 --- a/docs/references/backend/organization/delete-organization-membership.mdx +++ b/docs/references/backend/organization/delete-organization-membership.mdx @@ -1,6 +1,6 @@ --- title: '`deleteOrganizationMembership()`' -description: Use Clerk's Backend SDK to remove a user from the specified organization. +description: Use Clerk's JS Backend SDK to remove a user from the specified organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/delete-organization.mdx b/docs/references/backend/organization/delete-organization.mdx index 3655efbe6c..ff25a47973 100644 --- a/docs/references/backend/organization/delete-organization.mdx +++ b/docs/references/backend/organization/delete-organization.mdx @@ -1,6 +1,6 @@ --- title: '`deleteOrganization()`' -description: Use Clerk's Backend SDK to delete an organization. +description: Use Clerk's JS Backend SDK to delete an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization-invitation-list.mdx b/docs/references/backend/organization/get-organization-invitation-list.mdx index 3e55cf7fe4..97fcef3dd4 100644 --- a/docs/references/backend/organization/get-organization-invitation-list.mdx +++ b/docs/references/backend/organization/get-organization-invitation-list.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationInvitationList()`' -description: Use Clerk's Backend SDK to retrieve a list of organization invitations. +description: Use Clerk's JS Backend SDK to retrieve a list of organization invitations. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization-invitation.mdx b/docs/references/backend/organization/get-organization-invitation.mdx index 907bb4dad6..f8106032a3 100644 --- a/docs/references/backend/organization/get-organization-invitation.mdx +++ b/docs/references/backend/organization/get-organization-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationInvitation()`' -description: Use Clerk's Backend SDK to retrieve an organization invitation. +description: Use Clerk's JS Backend SDK to retrieve an organization invitation. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization-list.mdx b/docs/references/backend/organization/get-organization-list.mdx index 36e90acf1a..9454845977 100644 --- a/docs/references/backend/organization/get-organization-list.mdx +++ b/docs/references/backend/organization/get-organization-list.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationList()`' -description: Use Clerk's Backend SDK to retrieve a list of organizations. +description: Use Clerk's JS Backend SDK to retrieve a list of organizations. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization-membership-list.mdx b/docs/references/backend/organization/get-organization-membership-list.mdx index e74680b065..0900a26842 100644 --- a/docs/references/backend/organization/get-organization-membership-list.mdx +++ b/docs/references/backend/organization/get-organization-membership-list.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationMembershipList()`' -description: Use Clerk's Backend SDK to retrieve a list of memberships for an organization. +description: Use Clerk's JS Backend SDK to retrieve a list of memberships for an organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/get-organization.mdx b/docs/references/backend/organization/get-organization.mdx index 7a4e695605..fcc64ee6f2 100644 --- a/docs/references/backend/organization/get-organization.mdx +++ b/docs/references/backend/organization/get-organization.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganization()`' -description: Use Clerk's Backend SDK to retrieve a single organization. +description: Use Clerk's JS Backend SDK to retrieve a single organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/revoke-organization-invitation.mdx b/docs/references/backend/organization/revoke-organization-invitation.mdx index c4684c38da..c02855b307 100644 --- a/docs/references/backend/organization/revoke-organization-invitation.mdx +++ b/docs/references/backend/organization/revoke-organization-invitation.mdx @@ -1,6 +1,6 @@ --- title: '`revokeOrganizationInvitation()`' -description: Use Clerk's Backend SDK to revoke an organization invitation from a user for a specified organization. +description: Use Clerk's JS Backend SDK to revoke an organization invitation from a user for a specified organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/update-organization-logo.mdx b/docs/references/backend/organization/update-organization-logo.mdx index 68b9c62801..fcde2c3ac8 100644 --- a/docs/references/backend/organization/update-organization-logo.mdx +++ b/docs/references/backend/organization/update-organization-logo.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganizationLogo()`' -description: Use Clerk's Backend SDK to update an organization's logo. +description: Use Clerk's JS Backend SDK to update an organization's logo. sdk: js-backend --- @@ -36,7 +36,7 @@ function updateOrganizationLogo( > [!WARNING] -> Using Backend SDK methods can contribute towards rate limiting. To set an organization's logo, it's recommended to use the frontend [`organization.setLogo()`](/docs/references/javascript/organization#set-logo) method instead. +> Using JS Backend SDK methods can contribute towards rate limiting. To set an organization's logo, it's recommended to use the frontend [`organization.setLogo()`](/docs/references/javascript/organization#set-logo) method instead. ```tsx const organizationId = 'org_123' diff --git a/docs/references/backend/organization/update-organization-membership-metadata.mdx b/docs/references/backend/organization/update-organization-membership-metadata.mdx index e4c8188e13..e452b02684 100644 --- a/docs/references/backend/organization/update-organization-membership-metadata.mdx +++ b/docs/references/backend/organization/update-organization-membership-metadata.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganizationMembershipMetadata()`' -description: Use Clerk's Backend SDK to update the metadata associated with a user's organization membership. +description: Use Clerk's JS Backend SDK to update the metadata associated with a user's organization membership. sdk: js-backend --- diff --git a/docs/references/backend/organization/update-organization-membership.mdx b/docs/references/backend/organization/update-organization-membership.mdx index 208aaef231..6de95ea731 100644 --- a/docs/references/backend/organization/update-organization-membership.mdx +++ b/docs/references/backend/organization/update-organization-membership.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganizationMembership()`' -description: Use Clerk's Backend SDK to update a user's organization membership. +description: Use Clerk's JS Backend SDK to update a user's organization membership. sdk: js-backend --- diff --git a/docs/references/backend/organization/update-organization-metadata.mdx b/docs/references/backend/organization/update-organization-metadata.mdx index 9440e82f72..d8a12dfb6c 100644 --- a/docs/references/backend/organization/update-organization-metadata.mdx +++ b/docs/references/backend/organization/update-organization-metadata.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganizationMetadata()`' -description: Use Clerk's Backend SDK to update the metadata associated with a given organization. +description: Use Clerk's JS Backend SDK to update the metadata associated with a given organization. sdk: js-backend --- diff --git a/docs/references/backend/organization/update-organization.mdx b/docs/references/backend/organization/update-organization.mdx index 70acc0564c..7c5e592faf 100644 --- a/docs/references/backend/organization/update-organization.mdx +++ b/docs/references/backend/organization/update-organization.mdx @@ -1,6 +1,6 @@ --- title: '`updateOrganization()`' -description: Use Clerk's Backend SDK to update an organization's name. +description: Use Clerk's JS Backend SDK to update an organization's name. sdk: js-backend --- diff --git a/docs/references/backend/overview.mdx b/docs/references/backend/overview.mdx index e6f791983c..375a2e79cd 100644 --- a/docs/references/backend/overview.mdx +++ b/docs/references/backend/overview.mdx @@ -8,7 +8,7 @@ Clerk's JavaScript Backend SDK exposes the [Backend API](/docs/reference/backend ## Installation -Follow the instructions in the [quickstart](/docs/getting-started/quickstart) to add the JavaScript Backend SDK to your project. +Follow the instructions in the [quickstart](/docs/getting-started/quickstart) to add the JS Backend SDK to your project. ## Resources @@ -89,7 +89,7 @@ The **OAuth Application** resource allows you to create and manage OAuth applica ## Authentication utilities -In addition to the resources listed above, the JavaScript Backend SDK also provides low-level authentication utilities that can be used to verify Clerk-generated tokens and authenticate requests from your frontend: +In addition to the resources listed above, the JS Backend SDK also provides low-level authentication utilities that can be used to verify Clerk-generated tokens and authenticate requests from your frontend: - [`authenticateRequest()`](/docs/references/backend/authenticate-request): Authenticates a token passed from the frontend. - [`verifyToken()`](/docs/references/backend/verify-token): Verifies a Clerk-generated token signature. diff --git a/docs/references/backend/phone-numbers/create-phone-number.mdx b/docs/references/backend/phone-numbers/create-phone-number.mdx index f45174eaa2..970c214bc1 100644 --- a/docs/references/backend/phone-numbers/create-phone-number.mdx +++ b/docs/references/backend/phone-numbers/create-phone-number.mdx @@ -1,6 +1,6 @@ --- title: '`createPhoneNumber()`' -description: Use Clerk's Backend SDK to create a phone number for the specified user. +description: Use Clerk's JS Backend SDK to create a phone number for the specified user. sdk: js-backend --- diff --git a/docs/references/backend/phone-numbers/delete-phone-number.mdx b/docs/references/backend/phone-numbers/delete-phone-number.mdx index 3eeabc0f9b..d6fd2c4f25 100644 --- a/docs/references/backend/phone-numbers/delete-phone-number.mdx +++ b/docs/references/backend/phone-numbers/delete-phone-number.mdx @@ -1,6 +1,6 @@ --- title: '`deletePhoneNumber()`' -description: Use Clerk's Backend SDK to delete a phone number. +description: Use Clerk's JS Backend SDK to delete a phone number. sdk: js-backend --- diff --git a/docs/references/backend/phone-numbers/get-phone-number.mdx b/docs/references/backend/phone-numbers/get-phone-number.mdx index 12b51d953e..bc6668757b 100644 --- a/docs/references/backend/phone-numbers/get-phone-number.mdx +++ b/docs/references/backend/phone-numbers/get-phone-number.mdx @@ -1,6 +1,6 @@ --- title: '`getPhoneNumber()`' -description: Use Clerk's Backend SDK to retrieve a single phone number by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single phone number by its ID. sdk: js-backend --- diff --git a/docs/references/backend/phone-numbers/update-phone-number.mdx b/docs/references/backend/phone-numbers/update-phone-number.mdx index 5b7fafb0e6..df8a1ef07a 100644 --- a/docs/references/backend/phone-numbers/update-phone-number.mdx +++ b/docs/references/backend/phone-numbers/update-phone-number.mdx @@ -1,6 +1,6 @@ --- title: '`updatePhoneNumber()`' -description: Use Clerk's Backend SDK to update a phone number. +description: Use Clerk's JS Backend SDK to update a phone number. sdk: js-backend --- diff --git a/docs/references/backend/redirect-urls/create-redirect-url.mdx b/docs/references/backend/redirect-urls/create-redirect-url.mdx index 40faf34664..365c97a242 100644 --- a/docs/references/backend/redirect-urls/create-redirect-url.mdx +++ b/docs/references/backend/redirect-urls/create-redirect-url.mdx @@ -1,6 +1,6 @@ --- title: '`createRedirectUrl()`' -description: Use Clerk's Backend SDK to create a redirect URL. +description: Use Clerk's JS Backend SDK to create a redirect URL. sdk: js-backend --- diff --git a/docs/references/backend/redirect-urls/delete-redirect-url.mdx b/docs/references/backend/redirect-urls/delete-redirect-url.mdx index 373b812555..2766ac7ff4 100644 --- a/docs/references/backend/redirect-urls/delete-redirect-url.mdx +++ b/docs/references/backend/redirect-urls/delete-redirect-url.mdx @@ -1,6 +1,6 @@ --- title: '`deleteRedirectUrl()`' -description: Use Clerk's Backend SDK to delete a redirect URL. +description: Use Clerk's JS Backend SDK to delete a redirect URL. sdk: js-backend --- diff --git a/docs/references/backend/redirect-urls/get-redirect-url-list.mdx b/docs/references/backend/redirect-urls/get-redirect-url-list.mdx index 5c6d5ce816..e3e7dd18f6 100644 --- a/docs/references/backend/redirect-urls/get-redirect-url-list.mdx +++ b/docs/references/backend/redirect-urls/get-redirect-url-list.mdx @@ -1,6 +1,6 @@ --- title: '`getRedirectUrlList()`' -description: Use Clerk's Backend SDK to retrieve a list of white-listed redirect URLs. +description: Use Clerk's JS Backend SDK to retrieve a list of white-listed redirect URLs. sdk: js-backend --- diff --git a/docs/references/backend/redirect-urls/get-redirect-url.mdx b/docs/references/backend/redirect-urls/get-redirect-url.mdx index f1f9914b5c..5744fa65cf 100644 --- a/docs/references/backend/redirect-urls/get-redirect-url.mdx +++ b/docs/references/backend/redirect-urls/get-redirect-url.mdx @@ -1,6 +1,6 @@ --- title: '`getRedirectUrl()`' -description: Use Clerk's Backend SDK to retrieve a single redirect URL by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single redirect URL by its ID. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/create-saml-connection.mdx b/docs/references/backend/saml-connections/create-saml-connection.mdx index 0c098e5782..defb5e7e94 100644 --- a/docs/references/backend/saml-connections/create-saml-connection.mdx +++ b/docs/references/backend/saml-connections/create-saml-connection.mdx @@ -1,6 +1,6 @@ --- title: '`createSamlConnection()`' -description: Use Clerk's Backend SDK to create a SAML connection. +description: Use Clerk's JS Backend SDK to create a SAML connection. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/delete-saml-connection.mdx b/docs/references/backend/saml-connections/delete-saml-connection.mdx index c3c75a0996..460fcf758d 100644 --- a/docs/references/backend/saml-connections/delete-saml-connection.mdx +++ b/docs/references/backend/saml-connections/delete-saml-connection.mdx @@ -1,6 +1,6 @@ --- title: '`deleteSamlConnection()`' -description: Use Clerk's Backend SDK to delete a SAML connection. +description: Use Clerk's JS Backend SDK to delete a SAML connection. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/get-saml-connection-list.mdx b/docs/references/backend/saml-connections/get-saml-connection-list.mdx index 3da0c31f86..33a5aeeaf0 100644 --- a/docs/references/backend/saml-connections/get-saml-connection-list.mdx +++ b/docs/references/backend/saml-connections/get-saml-connection-list.mdx @@ -1,6 +1,6 @@ --- title: '`getSamlConnectionList()`' -description: Use Clerk's Backend SDK to retrieve the list of SAML connections for an instance. +description: Use Clerk's JS Backend SDK to retrieve the list of SAML connections for an instance. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/get-saml-connection.mdx b/docs/references/backend/saml-connections/get-saml-connection.mdx index 43f10b3e37..0516d5fef3 100644 --- a/docs/references/backend/saml-connections/get-saml-connection.mdx +++ b/docs/references/backend/saml-connections/get-saml-connection.mdx @@ -1,6 +1,6 @@ --- title: '`getSamlConnection()`' -description: Use Clerk's Backend SDK to retrieve a SAML connection. +description: Use Clerk's JS Backend SDK to retrieve a SAML connection. sdk: js-backend --- diff --git a/docs/references/backend/saml-connections/update-saml-connection.mdx b/docs/references/backend/saml-connections/update-saml-connection.mdx index c2e08e81fe..90d7734297 100644 --- a/docs/references/backend/saml-connections/update-saml-connection.mdx +++ b/docs/references/backend/saml-connections/update-saml-connection.mdx @@ -1,6 +1,6 @@ --- title: '`updateSamlConnection()`' -description: Use Clerk's Backend SDK to update a SAML connection. +description: Use Clerk's JS Backend SDK to update a SAML connection. sdk: js-backend --- diff --git a/docs/references/backend/sessions/get-session-list.mdx b/docs/references/backend/sessions/get-session-list.mdx index 04a3bf24fc..b504ce928b 100644 --- a/docs/references/backend/sessions/get-session-list.mdx +++ b/docs/references/backend/sessions/get-session-list.mdx @@ -1,6 +1,6 @@ --- title: '`getSessionList()`' -description: Use Clerk's Backend SDK to retrieve a list of sessions. +description: Use Clerk's JS Backend SDK to retrieve a list of sessions. sdk: js-backend --- diff --git a/docs/references/backend/sessions/get-session.mdx b/docs/references/backend/sessions/get-session.mdx index a2a19d5ec6..8b8c50b823 100644 --- a/docs/references/backend/sessions/get-session.mdx +++ b/docs/references/backend/sessions/get-session.mdx @@ -1,6 +1,6 @@ --- title: '`getSession()`' -description: Use Clerk's Backend SDK to retrieve a single session by its ID. +description: Use Clerk's JS Backend SDK to retrieve a single session by its ID. sdk: js-backend --- diff --git a/docs/references/backend/sessions/get-token.mdx b/docs/references/backend/sessions/get-token.mdx index 7c7a8955fb..06c64bde02 100644 --- a/docs/references/backend/sessions/get-token.mdx +++ b/docs/references/backend/sessions/get-token.mdx @@ -1,6 +1,6 @@ --- title: '`getToken()`' -description: Use Clerk's Backend SDK to retrieve a token for a JWT template that is defined in the Clerk Dashboard. +description: Use Clerk's JS Backend SDK to retrieve a token for a JWT template that is defined in the Clerk Dashboard. sdk: js-backend --- @@ -46,7 +46,7 @@ The following examples demonstrate how to use `getToken()` with different framew 1. Gets the current session ID using framework-specific auth helpers. 1. Checks if there's an active session. -1. Uses the Backend SDK's `getToken()` method to generate a token from a template. +1. Uses the JS Backend SDK's `getToken()` method to generate a token from a template. 1. Returns the token in the response. The token resembles the following: diff --git a/docs/references/backend/sessions/revoke-session.mdx b/docs/references/backend/sessions/revoke-session.mdx index f7f0facc62..c29e79bf2d 100644 --- a/docs/references/backend/sessions/revoke-session.mdx +++ b/docs/references/backend/sessions/revoke-session.mdx @@ -1,6 +1,6 @@ --- title: '`revokeSession()`' -description: Use Clerk's Backend SDK to revoke a session given its ID. +description: Use Clerk's JS Backend SDK to revoke a session given its ID. sdk: js-backend --- diff --git a/docs/references/backend/sessions/verify-session.mdx b/docs/references/backend/sessions/verify-session.mdx index 7e49a77990..60b60a4378 100644 --- a/docs/references/backend/sessions/verify-session.mdx +++ b/docs/references/backend/sessions/verify-session.mdx @@ -1,6 +1,6 @@ --- title: '`verifySession()` (deprecated)' -description: Use Clerk's Backend SDK to to verify whether a session with a given ID corresponds to the provided session token. +description: Use Clerk's JS Backend SDK to to verify whether a session with a given ID corresponds to the provided session token. sdk: js-backend --- diff --git a/docs/references/backend/sign-in-tokens/create-sign-in-token.mdx b/docs/references/backend/sign-in-tokens/create-sign-in-token.mdx index a24e1a2760..ba5ca2968d 100644 --- a/docs/references/backend/sign-in-tokens/create-sign-in-token.mdx +++ b/docs/references/backend/sign-in-tokens/create-sign-in-token.mdx @@ -1,6 +1,6 @@ --- title: '`createSignInToken()`' -description: Use Clerk's Backend SDK to create a new sign-in token for a given user. +description: Use Clerk's JS Backend SDK to create a new sign-in token for a given user. sdk: js-backend --- diff --git a/docs/references/backend/sign-in-tokens/revoke-sign-in-token.mdx b/docs/references/backend/sign-in-tokens/revoke-sign-in-token.mdx index d1a965668b..8e2667e99e 100644 --- a/docs/references/backend/sign-in-tokens/revoke-sign-in-token.mdx +++ b/docs/references/backend/sign-in-tokens/revoke-sign-in-token.mdx @@ -1,6 +1,6 @@ --- title: '`revokeSignInToken()`' -description: Use Clerk's Backend SDK to revoke a pending sign-in token. +description: Use Clerk's JS Backend SDK to revoke a pending sign-in token. sdk: js-backend --- diff --git a/docs/references/backend/testing-tokens/create-testing-token.mdx b/docs/references/backend/testing-tokens/create-testing-token.mdx index 4ed225b198..92df481249 100644 --- a/docs/references/backend/testing-tokens/create-testing-token.mdx +++ b/docs/references/backend/testing-tokens/create-testing-token.mdx @@ -1,6 +1,6 @@ --- title: '`createTestingToken()`' -description: Use Clerk's Backend SDK to create a testing token for the instance. +description: Use Clerk's JS Backend SDK to create a testing token for the instance. sdk: js-backend --- diff --git a/docs/references/backend/user/ban-user.mdx b/docs/references/backend/user/ban-user.mdx index 72631f5db7..b909707ae1 100644 --- a/docs/references/backend/user/ban-user.mdx +++ b/docs/references/backend/user/ban-user.mdx @@ -1,6 +1,6 @@ --- title: '`banUser()`' -description: Use Clerk's Backend SDK to mark a given user as banned. +description: Use Clerk's JS Backend SDK to mark a given user as banned. sdk: js-backend --- diff --git a/docs/references/backend/user/create-user.mdx b/docs/references/backend/user/create-user.mdx index 1bf0619fc4..a2ba05efc6 100644 --- a/docs/references/backend/user/create-user.mdx +++ b/docs/references/backend/user/create-user.mdx @@ -1,6 +1,6 @@ --- title: '`createUser()`' -description: Use Clerk's Backend SDK to create a user. +description: Use Clerk's JS Backend SDK to create a user. sdk: js-backend --- diff --git a/docs/references/backend/user/delete-user-backup-codes.mdx b/docs/references/backend/user/delete-user-backup-codes.mdx index 4a2207535e..df19f4f262 100644 --- a/docs/references/backend/user/delete-user-backup-codes.mdx +++ b/docs/references/backend/user/delete-user-backup-codes.mdx @@ -1,6 +1,6 @@ --- title: '`deleteUserBackupCodes()`' -description: Use Clerk's Backend SDK to delete all of a user's backup codes. +description: Use Clerk's JS Backend SDK to delete all of a user's backup codes. sdk: js-backend --- diff --git a/docs/references/backend/user/delete-user-external-account.mdx b/docs/references/backend/user/delete-user-external-account.mdx index 3b610bc94b..3a1f0efe26 100644 --- a/docs/references/backend/user/delete-user-external-account.mdx +++ b/docs/references/backend/user/delete-user-external-account.mdx @@ -1,6 +1,6 @@ --- title: '`deleteUserExternalAccount()`' -description: Use Clerk's Backend SDK to delete a user's external account by ID. +description: Use Clerk's JS Backend SDK to delete a user's external account by ID. sdk: js-backend --- diff --git a/docs/references/backend/user/delete-user-passkey.mdx b/docs/references/backend/user/delete-user-passkey.mdx index f0d87bfc53..bd97886b8a 100644 --- a/docs/references/backend/user/delete-user-passkey.mdx +++ b/docs/references/backend/user/delete-user-passkey.mdx @@ -1,6 +1,6 @@ --- title: '`deleteUserPasskey()`' -description: Use Clerk's Backend SDK to delete the passkey identification for a given user. +description: Use Clerk's JS Backend SDK to delete the passkey identification for a given user. sdk: js-backend --- diff --git a/docs/references/backend/user/delete-user-profile-image.mdx b/docs/references/backend/user/delete-user-profile-image.mdx index 940f2e14ae..be73b986ac 100644 --- a/docs/references/backend/user/delete-user-profile-image.mdx +++ b/docs/references/backend/user/delete-user-profile-image.mdx @@ -1,6 +1,6 @@ --- title: '`deleteUserProfileImage()`' -description: Use Clerk's Backend SDK to delete a user's profile image. +description: Use Clerk's JS Backend SDK to delete a user's profile image. sdk: js-backend --- @@ -17,7 +17,7 @@ function deleteUserProfileImage(userId: string): Promise > [!WARNING] -> Using Backend SDK methods can contribute towards rate limiting. To remove a user's profile image, it's recommended to use the frontend [`user.setProfileImage({ file: null })`](/docs/references/javascript/user#set-profile-image-params) method instead. +> Using JS Backend SDK methods can contribute towards rate limiting. To remove a user's profile image, it's recommended to use the frontend [`user.setProfileImage({ file: null })`](/docs/references/javascript/user#set-profile-image-params) method instead. ```tsx const userId = 'user_123' diff --git a/docs/references/backend/user/delete-user-totp.mdx b/docs/references/backend/user/delete-user-totp.mdx index b9e3d2bdfb..24468bc7d4 100644 --- a/docs/references/backend/user/delete-user-totp.mdx +++ b/docs/references/backend/user/delete-user-totp.mdx @@ -1,6 +1,6 @@ --- title: '`deleteUserTOTP()`' -description: Use Clerk's Backend SDK to delete all of a user's TOTPs. +description: Use Clerk's JS Backend SDK to delete all of a user's TOTPs. sdk: js-backend --- diff --git a/docs/references/backend/user/delete-user-web3-wallet.mdx b/docs/references/backend/user/delete-user-web3-wallet.mdx index e5a471ce57..69f9052023 100644 --- a/docs/references/backend/user/delete-user-web3-wallet.mdx +++ b/docs/references/backend/user/delete-user-web3-wallet.mdx @@ -1,6 +1,6 @@ --- title: '`deleteUserWeb3Wallet()`' -description: Use Clerk's Backend SDK to delete the Web3 wallet identification for a given user. +description: Use Clerk's JS Backend SDK to delete the Web3 wallet identification for a given user. sdk: js-backend --- diff --git a/docs/references/backend/user/delete-user.mdx b/docs/references/backend/user/delete-user.mdx index 724903da55..48dcdfee60 100644 --- a/docs/references/backend/user/delete-user.mdx +++ b/docs/references/backend/user/delete-user.mdx @@ -1,6 +1,6 @@ --- title: '`deleteUser()`' -description: Use Clerk's Backend SDK to delete a user. +description: Use Clerk's JS Backend SDK to delete a user. sdk: js-backend --- diff --git a/docs/references/backend/user/disable-user-mfa.mdx b/docs/references/backend/user/disable-user-mfa.mdx index 7c0d20d84f..96cf711405 100644 --- a/docs/references/backend/user/disable-user-mfa.mdx +++ b/docs/references/backend/user/disable-user-mfa.mdx @@ -1,6 +1,6 @@ --- title: '`disableUserMFA()`' -description: Use Clerk's Backend SDK to disable all of a user's MFA methods at once. +description: Use Clerk's JS Backend SDK to disable all of a user's MFA methods at once. sdk: js-backend --- diff --git a/docs/references/backend/user/get-count.mdx b/docs/references/backend/user/get-count.mdx index 42e6cb9ad2..7bd0dedb9e 100644 --- a/docs/references/backend/user/get-count.mdx +++ b/docs/references/backend/user/get-count.mdx @@ -1,6 +1,6 @@ --- title: '`getCount()`' -description: Use Clerk's Backend SDK to retrieve the total number of users. +description: Use Clerk's JS Backend SDK to retrieve the total number of users. sdk: js-backend --- diff --git a/docs/references/backend/user/get-organization-invitation-list.mdx b/docs/references/backend/user/get-organization-invitation-list.mdx index b9f864c9b8..9b99747498 100644 --- a/docs/references/backend/user/get-organization-invitation-list.mdx +++ b/docs/references/backend/user/get-organization-invitation-list.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationInvitationList()`' -description: Use Clerk's Backend SDK to retrieve a list of organization invitations for a given user. +description: Use Clerk's JS Backend SDK to retrieve a list of organization invitations for a given user. sdk: js-backend --- diff --git a/docs/references/backend/user/get-organization-membership-list.mdx b/docs/references/backend/user/get-organization-membership-list.mdx index 2454b1c985..14cf8fc43d 100644 --- a/docs/references/backend/user/get-organization-membership-list.mdx +++ b/docs/references/backend/user/get-organization-membership-list.mdx @@ -1,6 +1,6 @@ --- title: '`getOrganizationMembershipList()`' -description: Use Clerk's Backend SDK to retrieve a list of organization memberships for a given user. +description: Use Clerk's JS Backend SDK to retrieve a list of organization memberships for a given user. sdk: js-backend --- diff --git a/docs/references/backend/user/get-user-list.mdx b/docs/references/backend/user/get-user-list.mdx index 9916955795..37af668617 100644 --- a/docs/references/backend/user/get-user-list.mdx +++ b/docs/references/backend/user/get-user-list.mdx @@ -1,6 +1,6 @@ --- title: '`getUserList()`' -description: Use Clerk's Backend SDK to retrieve a list of users. +description: Use Clerk's JS Backend SDK to retrieve a list of users. sdk: js-backend --- diff --git a/docs/references/backend/user/get-user-oauth-access-token.mdx b/docs/references/backend/user/get-user-oauth-access-token.mdx index c7cfe3e04c..b860d9a0fe 100644 --- a/docs/references/backend/user/get-user-oauth-access-token.mdx +++ b/docs/references/backend/user/get-user-oauth-access-token.mdx @@ -1,6 +1,6 @@ --- title: getUserOauthAccessToken() -description: Use Clerk's Backend SDK to retrieve the corresponding OAuth access token for a user. +description: Use Clerk's JS Backend SDK to retrieve the corresponding OAuth access token for a user. sdk: js-backend --- diff --git a/docs/references/backend/user/get-user.mdx b/docs/references/backend/user/get-user.mdx index 8bf31965c7..7bcacbdaf2 100644 --- a/docs/references/backend/user/get-user.mdx +++ b/docs/references/backend/user/get-user.mdx @@ -1,6 +1,6 @@ --- title: '`getUser()`' -description: Use Clerk's Backend SDK to retrieve a single user by their ID. +description: Use Clerk's JS Backend SDK to retrieve a single user by their ID. sdk: js-backend --- diff --git a/docs/references/backend/user/lock-user.mdx b/docs/references/backend/user/lock-user.mdx index 2767cfafc7..506fc7fd11 100644 --- a/docs/references/backend/user/lock-user.mdx +++ b/docs/references/backend/user/lock-user.mdx @@ -1,6 +1,6 @@ --- title: '`lockUser()`' -description: Use Clerk's Backend SDK to mark a user as locked, which means they are not allowed to sign in again until the lock expires. +description: Use Clerk's JS Backend SDK to mark a user as locked, which means they are not allowed to sign in again until the lock expires. sdk: js-backend --- diff --git a/docs/references/backend/user/unban-user.mdx b/docs/references/backend/user/unban-user.mdx index 306d8c2aea..b3ec0dffb7 100644 --- a/docs/references/backend/user/unban-user.mdx +++ b/docs/references/backend/user/unban-user.mdx @@ -1,6 +1,6 @@ --- title: '`unbanUser()`' -description: Use Clerk's Backend SDK to remove the ban mark from a user. +description: Use Clerk's JS Backend SDK to remove the ban mark from a user. sdk: js-backend --- diff --git a/docs/references/backend/user/unlock-user.mdx b/docs/references/backend/user/unlock-user.mdx index b8339243a3..96159eb71a 100644 --- a/docs/references/backend/user/unlock-user.mdx +++ b/docs/references/backend/user/unlock-user.mdx @@ -1,6 +1,6 @@ --- title: '`unlockUser()`' -description: Use Clerk's Backend SDK to remove a sign-in lock from a user. +description: Use Clerk's JS Backend SDK to remove a sign-in lock from a user. sdk: js-backend --- diff --git a/docs/references/backend/user/update-user-metadata.mdx b/docs/references/backend/user/update-user-metadata.mdx index 8fc7eb8fba..b9d065301e 100644 --- a/docs/references/backend/user/update-user-metadata.mdx +++ b/docs/references/backend/user/update-user-metadata.mdx @@ -1,6 +1,6 @@ --- title: '`updateUserMetadata()`' -description: Use Clerk's Backend SDK to update the metadata associated with the specified user. +description: Use Clerk's JS Backend SDK to update the metadata associated with the specified user. sdk: js-backend --- diff --git a/docs/references/backend/user/update-user-profile-image.mdx b/docs/references/backend/user/update-user-profile-image.mdx index 8be600a653..e50a969fbf 100644 --- a/docs/references/backend/user/update-user-profile-image.mdx +++ b/docs/references/backend/user/update-user-profile-image.mdx @@ -1,6 +1,6 @@ --- title: '`updateUserProfileImage()`' -description: Use Clerk's Backend SDK to update a user's profile image. +description: Use Clerk's JS Backend SDK to update a user's profile image. sdk: js-backend --- @@ -17,7 +17,7 @@ function updateUserProfileImage(userId: string, params: { file: Blob | File }): > [!WARNING] -> Using Backend SDK methods can contribute towards rate limiting. To set a user's profile image, it's recommended to use the frontend [`user.setProfileImage()`](/docs/references/javascript/user#set-profile-image) method instead. +> Using JS Backend SDK methods can contribute towards rate limiting. To set a user's profile image, it's recommended to use the frontend [`user.setProfileImage()`](/docs/references/javascript/user#set-profile-image) method instead. ```tsx const userId = 'user_123' diff --git a/docs/references/backend/user/update-user.mdx b/docs/references/backend/user/update-user.mdx index 7956f34d2e..5b141e4141 100644 --- a/docs/references/backend/user/update-user.mdx +++ b/docs/references/backend/user/update-user.mdx @@ -1,6 +1,6 @@ --- title: '`updateUser()`' -description: Use Clerk's Backend SDK to update a user. +description: Use Clerk's JS Backend SDK to update a user. sdk: js-backend --- diff --git a/docs/references/backend/user/verify-password.mdx b/docs/references/backend/user/verify-password.mdx index 7e58768c62..c48f7336cd 100644 --- a/docs/references/backend/user/verify-password.mdx +++ b/docs/references/backend/user/verify-password.mdx @@ -1,6 +1,6 @@ --- title: '`verifyPassword()`' -description: Use Clerk's Backend SDK to check that the user's password matches the supplied input. Useful for custom auth flows and re-verification. +description: Use Clerk's JS Backend SDK to check that the user's password matches the supplied input. Useful for custom auth flows and re-verification. sdk: js-backend --- diff --git a/docs/references/backend/user/verify-totp.mdx b/docs/references/backend/user/verify-totp.mdx index 8fb58ec81d..9c8e326bcf 100644 --- a/docs/references/backend/user/verify-totp.mdx +++ b/docs/references/backend/user/verify-totp.mdx @@ -1,6 +1,6 @@ --- title: '`verifyTOTP()`' -description: Use Clerk's Backend SDK to verify a TOTP or backup code for a user. +description: Use Clerk's JS Backend SDK to verify a TOTP or backup code for a user. sdk: js-backend --- diff --git a/docs/references/backend/verify-token.mdx b/docs/references/backend/verify-token.mdx index 4106b9eacd..a94710a1e6 100644 --- a/docs/references/backend/verify-token.mdx +++ b/docs/references/backend/verify-token.mdx @@ -1,6 +1,6 @@ --- title: '`verifyToken()`' -description: Use Clerk's Backend SDK to verify a token signature. +description: Use Clerk's JS Backend SDK to verify a token signature. sdk: js-backend --- diff --git a/docs/references/backend/verify-webhook.mdx b/docs/references/backend/verify-webhook.mdx index 2dedc0083d..7f80c29a19 100644 --- a/docs/references/backend/verify-webhook.mdx +++ b/docs/references/backend/verify-webhook.mdx @@ -1,6 +1,6 @@ --- title: '`verifyWebhook()`' -description: Use Clerk's Backend SDK to verify a webhook signature. +description: Use Clerk's JS Backend SDK to verify a webhook signature. sdk: js-backend --- diff --git a/docs/references/express/overview.mdx b/docs/references/express/overview.mdx index 4b6151bd1c..d10898272a 100644 --- a/docs/references/express/overview.mdx +++ b/docs/references/express/overview.mdx @@ -182,7 +182,7 @@ app.get('/path', (req, res) => { ## `clerkClient` -[Clerk's JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JavaScript Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint. +[Clerk's JS Backend SDK](/docs/js-backend/getting-started/quickstart) provides access to Backend API resources and low-level authentication utilities for JavaScript environments. For example, to retrieve a list of all users in your application, you can use the `users.getUserList()` method from the JS Backend SDK instead of manually making a fetch request to the `https://api.clerk.com/v1/users` endpoint. All resource operations are mounted as sub-APIs on the `clerkClient` object. See the [reference documentation](/docs/js-backend/getting-started/quickstart#usage){{ target: '_blank' }} for more information. @@ -206,7 +206,7 @@ app.get('/user', async (req, res) => { res.status(401).json({ error: 'User not authenticated' }) } - // Use `clerkClient` to access Clerk's Backend SDK methods + // Use `clerkClient` to access Clerk's JS Backend SDK methods // and get the user's User object const user = await clerkClient.users.getUser(userId) diff --git a/docs/references/nextjs/app-router/route-handlers.mdx b/docs/references/nextjs/app-router/route-handlers.mdx index 96c17bbe6c..d0bf7f9aeb 100644 --- a/docs/references/nextjs/app-router/route-handlers.mdx +++ b/docs/references/nextjs/app-router/route-handlers.mdx @@ -93,9 +93,9 @@ export async function GET() { ## Interact with Clerk's Backend API -The [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments. +The [JS Backend SDK](/docs/js-backend/getting-started/quickstart) exposes the [Backend API](/docs/reference/backend-api){{ target: '_blank' }} resources and low-level authentication utilities for JavaScript environments. -`clerkClient` exposes an instance of the JavaScript Backend SDK for use in server environments. +`clerkClient` exposes an instance of the JS Backend SDK for use in server environments. ```ts {{ filename: 'app/api/route.ts' }} import { NextResponse, NextRequest } from 'next/server' diff --git a/docs/references/nuxt/overview.mdx b/docs/references/nuxt/overview.mdx index 4a56c52089..e757c39fa1 100644 --- a/docs/references/nuxt/overview.mdx +++ b/docs/references/nuxt/overview.mdx @@ -62,7 +62,7 @@ The `clerkMiddleware()` helper integrates Clerk authentication and authorization ## `clerkClient()` -The `clerkClient()` helper returns an instance of the [JavaScript Backend SDK](/docs/js-backend/getting-started/quickstart). [Learn more](/docs/nuxt/guides/users/reading). +The `clerkClient()` helper returns an instance of the [JS Backend SDK](/docs/js-backend/getting-started/quickstart). [Learn more](/docs/nuxt/guides/users/reading). ## Protect pages and API routes diff --git a/docs/references/overview.mdx b/docs/references/overview.mdx index 795f8a19a0..5781c8497a 100644 --- a/docs/references/overview.mdx +++ b/docs/references/overview.mdx @@ -83,7 +83,7 @@ description: Learn about the Clerk and community SDK's available for integrating - [JS Backend SDK](/docs/references/backend/overview) - - The Clerk Backend SDK exposes our Backend API resources and low-level authentication utilities for JavaScript environments. + - The JavaScript Backend SDK exposes our Backend API resources and low-level authentication utilities for JavaScript environments. - ---