You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/backend/src/tokens/verify.ts
+1-12Lines changed: 1 addition & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -40,22 +40,11 @@ export type VerifyTokenOptions = Simplify<
40
40
* 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#operation/GetJWKS){{ target: '_blank' }}.
41
41
*
42
42
* @param token - The token to verify.
43
-
* @param options - Options for verifying the token.
43
+
* @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 })`.
44
44
*
45
45
* @displayFunctionSignature
46
46
* @hideReturns
47
47
*
48
-
* @paramExtension
49
-
*
50
-
* ### `VerifyTokenOptions`
51
-
*
52
-
* 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: `createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY })`.
53
-
*
54
-
* > [!WARNING]
55
-
* You must provide either `jwtKey` or `secretKey`.
56
-
*
57
-
* <Typedoc src="backend/verify-token-options" />
58
-
*
59
48
* @example
60
49
*
61
50
* The following example demonstrates how to use the [JavaScript Backend SDK](https://clerk.com/docs/reference/backend/overview) to verify the token signature.
0 commit comments