Type 'SecretCallbackLong' is not assignable to type 'GetVerificationKey'.
ValchanOficial opened this issue · comments
ouch! we have tried so many times to fix this issue 😖
The newest version of jwks-rsa is compatible with the express-jwt but there is an issue with the typings.
Can you use as GetVerificationKey
for the time being as follows:
import { expressjwt, GetVerificationKey } from 'express-jwt';
import { expressJwtSecret } from 'jwks-rsa';
expressjwt({
secret: expressJwtSecret({
jwksUri: 'https://foobar.com'
}) as GetVerificationKey,
algorithms: ['RS512']
});
Thank you @jfromaniello