-
Notifications
You must be signed in to change notification settings - Fork 233
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
Type mismatch error with expressJwtSecret and express-jwt@7 #308
Comments
import { expressjwt as jwt } from 'express-jwt'
import jwksRsa from 'jwks-rsa'
const authorize = jwt({
// Dynamically provide a signing key
// based on the kid in the header and
// the signing keys provided by the JWKS endpoint.
secret: jwksRsa.expressJwtSecret({
cache: true,
rateLimit: true,
jwksRequestsPerMinute: 5,
jwksUri,
}) as GetVerificationKey,
}) Source: auth0/express-jwt#288 (comment) |
Yep, thanks for posting the workaround. Not much we can do in this SDK about auth0/express-jwt#288 (comment) |
At a minimum, the express-demo README should be updated to point out the |
klondikemarlen
added a commit
to icefoganalytics/travel-authorization
that referenced
this issue
Jan 15, 2024
klondikemarlen
added a commit
to icefoganalytics/travel-authorization
that referenced
this issue
Jan 15, 2024
Use type casting to make jwksRsa work with express-jwt See auth0/node-jwks-rsa#308
klondikemarlen
added a commit
to icefoganalytics/travel-authorization
that referenced
this issue
Jan 15, 2024
Use type casting to make jwksRsa work with express-jwt See auth0/node-jwks-rsa#308 See https://www.npmjs.com/package/express-jwt#migration-from-v6
klondikemarlen
added a commit
to icefoganalytics/travel-authorization
that referenced
this issue
Jan 15, 2024
Use type casting to make jwksRsa work with express-jwt See auth0/node-jwks-rsa#308 See https://www.npmjs.com/package/express-jwt#migration-from-v6
This was referenced Jan 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the problem
Typescript does not like the return type of
jwksRsa.expressJwtSecret
. I get this error when relying on TS to resolve the typesWhat was the expected behavior?
No type errors
Reproduction
This can be mitigated by explicitly typing
as GetVerificationKey
Environment
The text was updated successfully, but these errors were encountered: