0

When I login with a user, log out and sign in again with a different user it seems to retain the previous user details.

This is not the case when in Incognito mode so I assume it is cached.

How can I prevent caching, or is it out of my control?

Dim user = User.Identity.Name;

Dim claims = ClaimsPrincipal.Current.Identities.First().Claims.ToList()
    For Each claim In claims
    'Iterate claims
levis84
  • 974
  • 1
  • 12
  • 27
  • What method does it use to log out? – Andrew Morton Mar 02 '22 at 14:19
  • Microsoft.AspNetCore.Identity SignInManager.SignOutAsync() – levis84 Mar 02 '22 at 14:52
  • Have you tried deleting the cookie too? [ASP.NET Core Identity 2.0 SignoutAsync is not logging out user if the user signed in with Google](https://stackoverflow.com/a/55491003/1115360) – Andrew Morton Mar 02 '22 at 16:43
  • Yeh we do delete it. I think the problem is because our app opens tabs to switch to other apps. I will add a safeguard in as I am unsure if I will get to the bottom of this. Thanks – levis84 Mar 02 '22 at 16:46
  • Maybe [How to sign out other user in ASP.NET Core Identity](https://stackoverflow.com/questions/41629691/how-to-sign-out-other-user-in-asp-net-core-identity) has an answer that'll work for your situation. – Andrew Morton Mar 03 '22 at 18:34

0 Answers0