CakeDC / users

Users Plugin for CakePHP
https://www.cakedc.com
Other
520 stars 296 forks source link

'_Token' was not found in request data. #1019

Closed replay999 closed 1 year ago

replay999 commented 1 year ago

For a new install CakePHP 4.4.10 And add plugin If I load $this->loadComponent('FormProtection'); When I try registration, the error appears.

'_Token' was not found in request data. Cake\Controller\Exception\AuthSecurityException

composer create-project --prefer-dist cakephp/app:~4.0 testcake composer require cakedc/users Add plugin to applications and uncomment line $this->loadComponent('FormProtection'); from appcontroller

rochamarcelo commented 1 year ago

@replay999 which version of the users was installed?

replay999 commented 1 year ago

Hi @rochamarcelo version 11.2

rochamarcelo commented 1 year ago

This is happening because the plugin is using Security component.The next version of the plugin for CakePHP 5 is going to use FormProtection.

For now you can use Security component instead of FormProtection or extend the users controller to use FormProtection. Doc to extend the controller: https://github.com/CakeDC/users/blob/11.next-cake4/Docs/Documentation/Extending-the-Plugin.md#extending-the-controller

replay999 commented 1 year ago

Ok Thank