auth0 / node-jwks-rsa

A library to retrieve RSA public keys from a JWKS (JSON Web Key Set) endpoint.
MIT License
836 stars 236 forks source link

fix(type): correct the wrong type of the `getSigningKey` function arg… #289

Closed stegano closed 2 years ago

stegano commented 2 years ago

Description

fix(type): correct the wrong type of the getSigningKey function argument

// Example
client.getSigningKey(header.kid, function (err, key) {
    console.log(`=== Test ===`);
    console.log(`err ≥`, err);
    console.log(`key ≥`, key);
    callback(err, key?.getPublicKey());
});
# Result
=== Test ===
err ≥ TypeError: jwks must be a JSON Web Key Set formatted object
key ≥ undefined

References

Include any links supporting this change such as a:

  • GitHub Issue/PR number addressed or fixed
  • Auth0 Community post
  • StackOverflow post
  • Support forum thread
  • Related pull requests/issues from other repos

If there are no references, simply delete this section.

Testing

Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Also include details of the environment this PR was developed in (language/platform/browser version).

Checklist