tsndr / cloudflare-worker-jwt

A lightweight JWT implementation with ZERO dependencies for Cloudflare Workers.
MIT License
649 stars 51 forks source link

[CF Pages Sveltkit Server-side] ReferenceError: CryptoKey is not defined #79

Open TimKieu opened 4 months ago

TimKieu commented 4 months ago

The engine runs well on Workers but I am moving from Workers to Pages server-side code but got Error when jwt. sign.

ReferenceError: CryptoKey is not defined at Object.sign (file:///.../node_modules/.pnpm/@tsndr+cloudflare-worker-jwt@2.5.3/node_modules/@tsndr/cloudflare-worker-jwt/index.js:103:33)

Environment: MacOS ARM development CF Pages: Sveltkit with CF adapter

please help.