Skip to content
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

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

Merged
merged 1 commit into from
Mar 22, 2022

Conversation

stegano
Copy link
Contributor

@stegano stegano commented Mar 19, 2022

Description

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

  • If the err argument value is not null, the key argument value is undefined.
// 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).

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

…ument

* If the err argument value is not null, the key argument value is `undefined`.
@stegano stegano requested a review from a team as a code owner March 19, 2022 13:28
Copy link
Contributor

@adamjmcgrath adamjmcgrath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @stegano

@adamjmcgrath adamjmcgrath merged commit 96776c1 into auth0:master Mar 22, 2022
@adamjmcgrath adamjmcgrath mentioned this pull request Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants