Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Prevent calling the callback more than once #759

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

snocorp
Copy link
Contributor

@snocorp snocorp commented Dec 8, 2022

Changes

During the login in Auth0RestClient._request:

  • If the callback is passed, do not call resolve or reject as calling reject will invoke the callback again
  • if there is an error, return after handling the error instead of invoking the callback again

References

Fixes #758

Testing

Please 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.

  • This change adds unit test coverage
  • This change adds integration test coverage

Checklist

@snocorp snocorp requested a review from a team as a code owner December 8, 2022 22:44
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 @snocorp!

@adamjmcgrath adamjmcgrath merged commit aa8d938 into auth0:master Dec 9, 2022
@adamjmcgrath adamjmcgrath mentioned this pull request Dec 9, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Callback may be invoke more than once when handling errors
2 participants