Mvc3 Antiforgery token multi tabs

前端 未结 2 1276
感情败类
感情败类 2020-12-29 14:11

we have a specific issue with the anti forgery token on the login page. If the user logs in with only one active window everything works great however if the user opens the

2条回答
  •  独厮守ぢ
    2020-12-29 14:27

    Once you log in, all previous tokens are invalid. That's how it's supposed to work. Naz gets close to the right answer except, the token in the cookie doesn’t store the username. Only the token in the form does. It is precisely because of this issue: if a user logs in, all existing form tokens should be invalidated, but invalidating the cookie itself would be too problematic and user-unfriendly.

提交回复
热议问题