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

Fix encore + clerk ts template #193

Open
paulwei-se opened this issue Jan 12, 2025 · 0 comments
Open

Fix encore + clerk ts template #193

paulwei-se opened this issue Jan 12, 2025 · 0 comments

Comments

@paulwei-se
Copy link

The typescripts tutorial at https://encore.dev/templates/clerk will result to an error if followed exactly.
ERR error="Failed to resolve JWK during verification." endpoint=myAuthHandler service=auth span_id=j6k6he3h81maq trace_id=8833e0movdg4acttoo6vga3qpo

according to Clerk document: https://clerk.com/docs/references/backend/verify-token#verify-token-options
verifyToken() at auth/auth.ts:35 must set the secretKey

The following code should fix it:

    const result = await verifyToken(token, {
      secretKey: clerkSecretKey(), // add this line
      authorizedParties: AUTHORIZED_PARTIES,
    });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant