-
Notifications
You must be signed in to change notification settings - Fork 416
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
event:auth-loginRequired fired multiple times causing login dialog popup multiple times. #43
Comments
maybe you should change your login dialog pop up to not fire if one is already open, say in maybe a service that handles that. |
I am doing that as workaround, in my auth controller using a scope variable to suppress login popups until previous dialog is closed. |
Those should be done in your app. There is no way to account for all that (ngRoute vs ui-router vs custom) in this module. |
@eddiemonge is right, just ignore the messages if you are still waiting for user to submit... |
Why not wait for loginConfirmed() or loginCancelled() before issuing new 'event:auth-loginRequired'? |
how did you resolve this? I have the exact same scenario. If I have to add a check in service that opens the modal, how do I do that? Say my modal is called from a service like this everytime the 401 is thrown:
The above opens multiple login modals when |
Thanks heaps for that @xmlking That certainly gives me an idea now on how to approach this. Thanks again for helping. I was stuck on that for a long time wondering how to resolve it. Much appreciated. :) |
I am using angular UI router that supports nested views. My nested views invoke multiple REST services at same time for for a given URL .when two REST calls receive 401 error, this module is broadcasting two loginRequired events.
This causes my login dialog pops up again after successful login. It would be nice if this module Wait for loginConfirmed() call before it broadcast next loginRequired event.
The text was updated successfully, but these errors were encountered: