Closed Codename-404 closed 9 months ago
This library is explicitly designed to be used with Cloudflare Workers, and is therefore not compatible with Node.js.
I get that it's explicitly designed to be used with cloudflare workers, but some of us write code that runs in both environments and it would be nice to rely on a single implementation. If it's firmly out of scope for you, then okay (its your lib), but is there any downside to ensuring compatibility across node and workers? It worked back in 2.2.3.
Happy to send a PR fixing it if that's okay.
Hi, verify returns false, always. It was working in the middleware files but now it's not working. Note I update my node js to the latest version, and now it's not working. However it was working when I had node v18. Not sure if it's related.
Here'e my code:
const jwt_token = await jwt.sign( { ...filteredData, expires: expires }, process.env.AUTH_SECRET );
const verifyRes = await jwt.verify(jwt_token, process.env.AUTH_SECRET); // returns false here