Skip to content

jwksUri option should be optional #440

@webJose

Description

@webJose

Checklist

  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

When setting a custom fetcher via the options' fetcher property, the jwksUri option is not needed. Right now, jwksUri is not optional, so this raises a TS error.

Reproduction

const expressJwt = jwksClient.expressJwtSecret({
    jwksUri: undefined!, // Look how I had to add (!) to suppress the TS error
    fetcher: () => getAzureKeys(),
    cache: true,
    rateLimit: false,
});

Additional context

No response

jwks-rsa version

3.2.0

Node.js version

22

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions