-
Notifications
You must be signed in to change notification settings - Fork 84
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
How do you perform logout #4
Comments
I'm gonna put my answer to your question on the blogpost here as well.
|
I have the following setup which I am not completely happy with but kind of works: 1- Lets say User logs in successfully. Some user information like current user and flags gets stored in localStorage using a UserService:
and the LocalStorageService is
Now a typical Signout >
Now, I have a very simple WinLoginComponent:
Having loginAfterSignout() as:
Also I have a WinAuthInterceptor as follows:
Notice in above I do not set the credentials flag if the user has signedOut so the user will not be able to access the API unless he logins back. The key problem is that I could not exactly achieve what I wanted without making changes to my Internet Settings Internet Options > Security Settings > Local Intranet Zone > User Authentication : By default I had "Automatic logon only in Intranet zone" Above meant when I try to sign back into the site I get automatically signed backed into the site [without being shown the browser login window] To be prompted I had to change settings to "Prompt for user name and password" and restart the browser. Narrowed down version of my problem is: How would I trigger displaying the Windows built in login window on demand without changing my intranet security settings? This is something I could not accomplish in above setup. |
Hi Ruben,
I posted this question on your blog and Stackoverflow : https://stackoverflow.com/questions/48974995/logout-facility-in-angular-5-application-when-using-windows-authentication
How do you perform logout()
The text was updated successfully, but these errors were encountered: