auth0 / angular-lock

MIT License
18 stars 15 forks source link

How to stop listening for event #41

Closed ghost closed 5 years ago

ghost commented 5 years ago

Maybe I'm bending the lock in ways it's not meant for... But I have situations where I need to not only listen for an event (registering a callback? I don't know what mechanism is being used here...) but stop listening as well.

E.g. I listen for authorization_error in one routed component in order to redirect to 403 error page on failed login, as the user cannot access the page unless logged in. From that error page, suppose they click a link to a different routed component that has optional login. If they try to log in on that page and fail, the 403 redirect set in the first component fires, but that's not what's intended.

ghost commented 5 years ago

Wrong repo, sorry.