While playing with Spring security
, I was wondering about the approach of CSRF
(Cross Site Request Forgery) Token lifecycle at application logout.
Let's say a user logs in and navigates on my website. Then he logs out. Should I invalidate the CSRF token (implemented as a cookie in my case, if it matters)?
If no, is there any caveat I should be aware of in term of security?
If yes, how am I supposed to manage any further action of the user on the application? Without any CSRF
Token, the server-side will forbid some actions. Should I generate a new Token then?
I'm using Spring boot
for the server side, and it seems it invalidates by default the Token (or I made something wrong that leads to this result...)
Thanks for any help.