Clear browser cookies after logout
See original GitHub issueLogout() removes all authenticated account from active directory , but the account is still signed in in the browser
`
IEnumerable<IAccount> accounts = await App.PCA.GetAccountsAsync();
while (accounts.Any()) { await App.PCA.RemoveAsync(accounts.FirstOrDefault()); accounts = await App.PCA.GetAccountsAsync(); } `
so I need to logout the user from the browser too
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Remove cookie on log-out - asp.net
However, you can direct the user's browser to delete the cookie by setting the cookie's expiration date to a past date. The next...
Read more >Delete Cookies on Logout
I would like to have all cookies related to a users session deleted upon logout, but it does not appear that the auth0-js...
Read more >Should I clear browser cookies or log out manually if I want ...
If you do not logout but only clear the cookies then the website still stores your session ID, so best is to logout...
Read more >Removing cookies from browsers during normal logout
Note: An intentional logout does not leave a user with a stale cookie because it is normal browser operation to remove session cookies...
Read more >Remove all sessions and cookies after logout in ASP.Net ...
I want all pages must be accessible by user only when if user is login properly. If user is logout or is not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@KyrillosS25 @DiegoFaFe @sagarmp02 @rodrigordi
@TiagoBrenck is right that your app should not impose sign-out on other apps without the user realizing. There is an experience with Azure Active directory where the user can click on the … on the right of the tile showing the identity of the user and selection forget. That’s the recommended way.
Now we also agree that there are other important scenarios, such as the case where several users share the same device and have to sign-in for a shift at work, and have to sign-out at the end of the shift. Are you in such scenarios? Could you please tell us more about what you are trying to achieve and how the lack of full sign-out is blocking your scenarios?
BTW we have an ongoing effort to spec sign-out for mobile applications. cc: @brandwe
cc: @TiagoBrenck @jennyf19
I think this subject is a little bit polemic. IMHO, this is not a MSAL bug and the library shouldn’t disconnect you from you authprovider, but from the app only. If you want your app to drop your session from the authprovider, then this must be done in a custom code.
Lets have this example, where I have a MSAL mobile app that uses gmail account o sign in. Then I sign out, and MSAL drops all my gmail sessions. I then notice that I have stopped receiving emails, all my other apps stopped pushing me notifications, and when I try to open one of them, I figure out that I needed to login with gmail again. And then I would think: “how dare you MSAL to disconnect me from all these other apps?”
I found an interesting answer on StackOverflow about this topic. What do you think @jennyf19 @jmprieur ?