express-jwt
express-jwt copied to clipboard
Update README.md
Added reference to jwks-rsa project with sample code
Unfortunately this will no longer work with v7 as I changed the signature of the secret function:
https://github.com/auth0/node-jwks-rsa/blob/master/src/integrations/express.js#L25-L36
We will need to change this to something like this:
return async function secretProvider(req, token) {
if (!token.header.alg || !supportedAlg.includes(token.header.alg)) {
return;
}
const key = await client.getSigningKey(token.header.kid);
return key.publicKey || key.rsaPublicKey;
};