I have this form i am posting and I am placing my csrf token like this
controller method
$csrf = array(
'name' => $this->security->get_csrf_token_name(),
'hash' => $this->security->get_csrf_hash()
);
passing to view like this
<input type="hidden" name="<?=$csrf['name'];?>" value="<?=$csrf['hash'];?>" />
The docs say
Tokens may be either regenerated on every submission (default): https://codeigniter.com/user_guide/libraries/security.html
My question is how the csrf is actually verified. When I use $this->security->get_csrf_hash()
when the form is submitted, shall the value be equal to the hash submitted or how will the posted csrf hash be taken as valid?.