Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/correct-backend-reference-prerequisites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/backend': patch
---

Correct the documented Directory Sync prerequisites for `updateOrganization()` and clarify that `verifyToken()` requires `secretKey` whenever `jwtKey` is omitted, including when JWKS is cached.
6 changes: 2 additions & 4 deletions packages/backend/src/api/endpoints/OrganizationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,11 @@ export type GetOrganizationParams = (
/** @inline */
export type UpdateParams = {
/**
* Lets Organization admins set up enterprise SSO in `<OrganizationProfile />`. Requires Clerk
* Organizations to be enabled for the instance and a [Pro or Business plan](/pricing) in production.
* Lets Organization admins set up enterprise SSO in `<OrganizationProfile />`. Requires Clerk Organizations to be enabled for the instance and a [Pro or Business plan](https://clerk.com/pricing) in production.
*/
selfServeSsoEnabled?: boolean;
/**
* Lets Organization admins set up Directory Sync in `<OrganizationProfile />`. Requires self-serve
* SSO for the Organization, an SSO connection, and a [Pro or Business plan](/pricing) in production.
* Lets Organization admins set up Directory Sync in `<OrganizationProfile />`. Requires Clerk Organizations to be enabled for the instance, an SSO connection, and a [Pro or Business plan](https://clerk.com/pricing) in production.
*/
selfServeDirectorySyncEnabled?: boolean;
/** The name to update the Organization with. */
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/tokens/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type VerifyTokenOptions = Simplify<
* > [!WARNING]
* > This is a lower-level method intended for more advanced use-cases. It's recommended to use [`authenticateRequest()`](https://clerk.com/docs/reference/backend/authenticate-request), which fully authenticates a token passed from the `request` object.
*
* Verifies a Clerk-generated token signature. Networkless if the `jwtKey` is provided. Otherwise, performs a network call to retrieve the JWKS from the [Backend API](https://clerk.com/docs/reference/backend-api/tag/jwks/GET/jwks){{ target: '_blank' }}.
* Verifies a Clerk-generated token signature. Networkless if `jwtKey` is provided. Otherwise, it requires `secretKey` and makes a network call to retrieve the JWKS from the [Backend API](https://clerk.com/docs/reference/backend-api/tag/jwks/GET/jwks){{ target: '_blank' }} when the key isn't cached.
*
* @param token - The token to verify.
* @param options - Options for verifying the token. It is recommended to set these options as [environment variables](/docs/guides/development/clerk-environment-variables#api-and-sdk-configuration) where possible, and then pass them to the function. For example, you can set the `secretKey` option using the `CLERK_SECRET_KEY` environment variable, and then pass it to the function like this: `verifyToken(token, { secretKey: process.env.CLERK_SECRET_KEY })`.
Expand Down
Loading