Open 4quarks opened 8 months ago
Is the baseurl set up correctly? I cannot reproduce it, but something that may give a hint is that the CSRF tokens are generated by a mixture of the baseurl, current time, the fields in the form, the target URL and a random value.
This was doing my head in as well... xD
changing the following 2 settings solved it for me (obviously only for dev instance): set session.cookie_secure in config/bootstrap.php to false set secure in registerMiddleware('csrf' part of config/routes.php to false
Guessing that using a self-signed cert would solve this as well :) and perhaps would be a better option
Description
I tried to install cerebrate on fresh VMs (Ubuntu 20.04 and 22.04) using both apache2 and ngix and I am encountering a "Missing or incorrect CSRF cookie type" error when attempting to log in to the application. The issue arises when navigating to '/users/login?redirect=%2F', resulting in the application failing to find the requested address and throwing a CSRF token validation error.
Steps to Reproduce
Expected Behavior
The login should be successful, and the user should be redirected to the specified redirect URL without encountering CSRF token errors.
Actual Behavior
The login process is interrupted by a `Missing or incorrect CSRF cookie type." error.
Environment
Log Output
/var/www/cerebrate/logs/error.log
Additional Context
Attempts to Resolve
I am looking for guidance on how to resolve this issue and would appreciate any advice or suggestions. Thank you in advance.