Closed mlanza closed 2 years ago
For what it's worth, I just reduced my version to use:
import * as jwt from "https://deno.land/x/djwt@v2.1/mod.ts";
and added "HS256":
const verified = await jwt.verify(token, JWT_SECRET, "HS256");
And this works! But not in 2.7.
Thank you. I will look into that, but to get up and running I am content with using the older version for now.
While I am new to JWT I have run virtually the same code through Node's
jsonwebtoken
library and it works. I am targeting this library, however, to reduce my bundling dependencies.Running
decode
against my JWT works fine. Runningverify
, however, results in a null exception:Here's what I'm running:
I am certain my secret and token are fine having confirmed them in Node. The only difference is Node's methods are synchronous and don't require
await
.My decoded payload follows, sensitive content elided: