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

Ability to remove event listeners to avoid side effects #70

Open
ghost opened this issue Feb 17, 2021 · 0 comments
Open

Ability to remove event listeners to avoid side effects #70

ghost opened this issue Feb 17, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 17, 2021

Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.

Thank you in advance for helping us to improve this library! Your attention to detail here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.

By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.

Describe the problem you'd like to have solved

I use react to build MFA related pages and have different components handle different page (e.g. Push notification, SMS, backup Code). Thus, I'd like to handle a particular event (transaction.on('error') transaction.on('auth-response')) differently on different pages.

However, when user switch between pages, the previous event listeners are still there, which interrupt on the logic in the new page.

Describe the ideal solution

I'd like to be able to remove the listeners before the page unload, so that there is no side effects

Alternatives and current work-arounds

A clear and concise description of any alternatives you've considered or any work-arounds that are currently in place.

Additional context

Add any other context or screenshots about the feature request here.

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

No branches or pull requests

0 participants