- Navigate to Login page.
- Login as user A
- Press browser’s Back button to navigate to Login page ahead.
- Login as user B
“the provided anti-forgery token was meant for a different claims-based user” error.
One simple solution that works for me is to disable the caching of the login page.
2: // GET: /Account/Login
4: // disable caching on login page to avoid "the provided anti-forgery token was meant for a different claims-based user"
5: [OutputCache(NoStore = true, Location = OutputCacheLocation.None)]
6: public ActionResult Login(string returnUrl)