tsndr / cloudflare-worker-jwt

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

Decoding the payload results in garbled text when the JWT contains non-ASCII characters #58

Closed kira924age closed 8 months ago

kira924age commented 8 months ago

Because atob() is used for base64 decoding, the payload is not correctly decoded when a JWT contains multibyte character strings.

https://github.com/tsndr/cloudflare-worker-jwt/blob/main/src/index.ts#L201C27-L201C31