cloudflare-worker-jwt icon indicating copy to clipboard operation
cloudflare-worker-jwt copied to clipboard

A lightweight JWT implementation with ZERO dependencies for Cloudflare Workers.

Results 15 cloudflare-worker-jwt issues
Sort by recently updated
recently updated
newest added

fixes #15 I was still having the same issue with 1.4.1 but I played around with it and replacing https://github.com/tsndr/cloudflare-worker-jwt/blob/594cdd6c05e2b0f137a7d0b53340cd212a9e9ba5/index.js#L114 and https://github.com/tsndr/cloudflare-worker-jwt/blob/594cdd6c05e2b0f137a7d0b53340cd212a9e9ba5/index.js#L77 with `keyData = Base64URL.parse(secret)` fixed the issue for...

I'm trying to access this function on Node 16.17.0 `jwt.sign({ ...payload }, secret);`

Unable to import RSA key with format raw

`importKey` uses "verify" and "sign" as keyUsages, but the RSASSA-PKCS1-v1_5 algorithm does not support signing, so trying to use verify() fails since importing the key/JWK fails. My suggestion would be...

I started getting these today. My tokens are from auth0, I checked that the token is ok on https://jwt.io/ and that it is verified there with the same key. Stack...

I am getting Subtle crypto not found error. Why would this not work on nodejs? Any work around to make it work on nodejs as well?

The `sign` and `verify` methods both accept `string | JsonWebKey | WebCrypto` for the `secret` parameter. This updates the documentation and type annotations everywhere to reflect that.

I noted `verify` is internally calling `decode`: https://github.com/tsndr/cloudflare-worker-jwt/blob/main/src/index.ts#L210 In a user flow, normally you want to verify the code _before_ decoding it, in this way: ```ts await verify(token, JWT_SECRET, {...

When adding 'keyid' or 'kid' to the sign.options, it's not passed correctly in the JWT token..

Hey -- thanks for making this, it's been very helpful for me! I added a bit to it to enable end-to-end verification of the CF Zero-Trust access token, which is...