Type 'SecretCallbackLong' is not assignable to type 'GetVerificationKey'.
ValchanOficial opened this issue · 4 comments
ValchanOficial commented
jfromaniello commented
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']
});
ValchanOficial commented
Thank you @jfromaniello
Sti2nd commented
Would be great if the typings were consistent with each other, but good to know that they are supposed to work together. Then it feels safer to cast.
jfromaniello commented
@Sti2nd thanks for the feedback, I think this should fix it auth0/node-jwks-rsa#412