Skip to content
Discussion options

You must be logged in to vote

its because jsowebtoken library doesn't work in Edge Runtime. Replace jsonwebtoken with a library like jose (Edge-compatible JWT library).

Next.js middleware runs on Edge by default, but jsonwebtoken and it uses Node.js crypto APIs that aren't available there.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ayeshansari124
Comment options

Answer selected by ayeshansari124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants