Generate new CSRF token without reloading the entire form

后端 未结 4 2107
误落风尘
误落风尘 2020-12-01 06:55

If a user gets logged out (due to session expiration or for other reasons) in the background while using my Symfony2 application, I have implemented a JS layer appearing on

4条回答
  •  伪装坚强ぢ
    2020-12-01 07:30

    To me the easier solution is to redirect user on the same form, passing data alredy inserted via POST.
    In that way the token will be generated again in an automatic way.
    Moreover, you'll not lost data input.

提交回复
热议问题