I know how actually CSRF works, it usually stores the random text in session and will have same on the HTML form in hidden token CSRF field. When user submits the form, the HTML form token in matched with session CSRF and validate respectively.
The doubt is if I refresh the page, new CSRF token will be generated and will be valid only once till the next refresh. In this case if I open the same form multiple time in new tabs and submit the subsequent forms how would the framework or anyone store the token in session and validate it. Will it be storing the latest token or will store all the new tokens generated in the form of array and after validating the token it will remove the token from session.
I am not able to get how multiple tokens for the same user will be handled when the HTML form opened in multiple tabs and submitted one after the other.
I am dumping the session in the controller but not able to see all the tokens over there as per my assumptions.
Can anyone help me understand how it handles.