Question: Laravel generating different tokens if multiple tabs are opened at same time

Question

Laravel generating different tokens if multiple tabs are opened at same time

Answers 0
Added at 2016-12-21 19:12
Tags
Question

CsrfTokenException - When open multiple tabs simultaneously the server should generate only one token to this session, but are generating more than one.

Do you have an idea how to handle this?

Nginx + Laravel + Redis (also happens with file session driver)

It is not happening only in my website

I opened in private mode multiple tabs AT SAME TIME https://laracasts.com/login and had two different tokens in the csrf field

enter image description here

And after I submited one of than (the "wrong with outdated csrf") and got whoops because the csrftokenexception

enter image description here

How should I handle this?

Answers to

Laravel generating different tokens if multiple tabs are opened at same time

Source Show
◀ Wstecz