Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove /nodejs/token-verification; update authenticateRequest() and verifyToken() reference docs #1242

Merged
merged 10 commits into from
Jul 16, 2024

Conversation

alexisintech
Copy link
Member

@alexisintech alexisintech commented Jul 8, 2024

Warning

Needs clerk/clerk#486 to be merged for redirects

Explanation:

The linear ticket reads:

This page exists in the Node SDK docs but seems like a guide about networkless token verification, and it also has next.js examples. It feels misplaced, and I think it can be combined in the manual-jwt doc

This PR:

  • Removes /nodejs/token-verification as it is an unnecessary page
  • Adds comment to track duped examples
  • Fixes spelling error 'authenication' --> 'authentication'

@alexisintech alexisintech requested a review from a team as a code owner July 8, 2024 20:18
Copy link

github-actions bot commented Jul 8, 2024

Hey, here’s your docs preview: https://clerk.com/docs/pr/1242

@alexisintech alexisintech requested review from jescalan and brkalow July 10, 2024 19:40
@@ -22,36 +22,63 @@ function authenticateRequest: (request: Request, options: AuthenticateRequestOpt

## `AuthenticateRequestOptions`

It is recommended to set these options as [environment variables](/docs/deployments/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 })`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also mention the publishableKey here.

Copy link
Member Author

@alexisintech alexisintech Jul 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mention it throughout the doc - did you see the example sections?
It's not required when using it with a higher level SDK, but it is required if using it with the backend SDK on its own (using createClerkClient) which I explain and demonstrate in the example sections

docs/references/backend/verify-token.mdx Outdated Show resolved Hide resolved
docs/references/backend/verify-token.mdx Outdated Show resolved Hide resolved
@alexisintech alexisintech changed the title Remove /nodejs/token-verification Remove /nodejs/token-verification; update authenticateRequest() and verifyToken() reference docs Jul 12, 2024
@alexisintech alexisintech merged commit 6c8d843 into main Jul 16, 2024
4 checks passed
@alexisintech alexisintech deleted the aa/DOCS-8891 branch July 16, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants