Closed unsafecode closed 5 years ago
@unsafecode - what specific login errors are you referring to? If you mean to say what happens when a user enters an invalid username/password on the login screen, that will be handled in AAD and nothing needs to be done on the client app. Only after successful authentication will AAD redirect to your client app.
@manishrasrani For instance, we stumbled upon a user whose account was disabled, and every time he tried to login an error was returned by AAD, yet still the redirection happened, and without any token this yielded an infinite loop.
Point is, the AAD login error should fill an ADAL variable in localStorage, and the library should be able to detect it at least.
We are also having trouble handling someone who does not have access getting an infinite loop.
@unsafecode - adal.js does set a variable in localStorage / sessionStorage for errors. You can check the status populated in the variables - 'adal.error' and 'adal.login.error'. An empty value indicates no error during Auth. Let me know if this helps.
What is the supported way of handling login errors?