question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clear browser cookies after logout

See original GitHub issue

Logout() 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(); } ` image

so I need to logout the user from the browser too

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jmprieurcommented, Nov 29, 2019

@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

2reactions
TiagoBrenckcommented, Nov 29, 2019

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 ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found