I'm trying to
I'm trying to verify a jwt
that use the RS256
algorithm. When using the hs256
algorithm everything works fine
let opts = {
audience: 'y',
issuer: `https://x.auth0.com/`,
algorithms: ["RS256"]
}
jwt.verify(payload.token, 'secret', opts, (err, decoded) => {
if (err) {
console.log("invalid token in iamonline service " + err.message);
return;
}
I keep getting the error: PEM_read_bio_PUBKEY failed
While auth0
has documentation to do so, it assumes you are using express which I'm not. I am doing this over a websocket so no middleware.
The annoying bit is that HS256
is fine for me but auth0 custom login forms seem to require RS256
.