NoCSRF
NoCSRF copied to clipboard
multiple not workin
hi I try use multiple, but token is generated each page reload. so how to do that?
I am doing ajax request, so I need generate a token for X minutes valid.
thanks
should I do something like:
$csrftoken = if(isset($_SESSION[ 'csrf_token'])) ? $_SESSION[ 'csrf_token'] : NoCSRF::generate('token');
It has that option in the check() function $multiple see https://github.com/BKcore/NoCSRF/blob/master/example/nocsrf.php line 24 and line 28