-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RS256 problem 4.2.x #70
Comments
What's the error you get? It seems to be working fine for me. Check the test I added on the branch issue_70. |
~/ cat package.json| grep json ~/ cat package.json| grep json |
can you give me the first line of your app.rsa.pub file? thanks |
-----BEGIN PUBLIC KEY----- |
got it! Thanks, it should be fixed on 4.2.1 |
uhhh...my
Should this format be supported by jsonwebtoken? |
Hi,
this package have a problem with decoding RS256 signed messages
var jwt = require('jsonwebtoken');
var fs = require('fs');
var cert_pub = fs.readFileSync('app.rsa.pub');
var cert_priv = fs.readFileSync('app.rsa');
var token = jwt.sign({ foo: 'bar' }, cert_priv, { algorithm: 'RS256'});
jwt.verify(token, cert_pub, function(err, decoded) {
console.log("Decoded: " + JSON.stringify(decoded));
console.log("Error: " + err);
});
This code woks fine in 4.1.0, but on 4.2.0 version problem is with verifying token.
The text was updated successfully, but these errors were encountered: