I have enabled csrf security component in CakePHP v3. in AppConroller.php file in initialize() method
public function initialize() {
// some of my other initialization here
$this->loadComponent('Csrf');
// some of my other initialization here
}
in View side I am using below code
echo $this->Form->create(....);
// some of other stuffs
echo $this->Form->end();
Yes, it will display CSRF token in hidden field below of form tag with CSRF Token value. BUT, after Page Reload.. CSRF token value remain same.
Actual concept of CSRF token, on every request it will generate new CSRF token. so how can we achieve this in CakePHP v3?