Sometimes there is a problem that you can no longer log in to the Magento backend, even though you have entered the user and password correctly. You are redirected to the login again and again. In this case you get the error message "incorrect form key" (invalid form key). This can occur after patches or when migrating the store to another server.
The reason for this error is the form validation built into Magento. Each form has a hidden "form key". This is unique for each call, so an attacker/bot cannot send the same form multiple times. This security check takes place in Magento not only for normal forms, but also for login or registration.
In most cases, the only option in this case is to make an adjustment via the database.
The following steps must be carried out to rectify the error:
- Login to the database via phpMyAdmin and execute the following command:
DELETE FROM core_config_data WHERE path='web/cookie/cookie_domain';
- Deleting the cache via the file system:
rm -rf var/cache/*
The problem should be solved after reloading the login screen.
Leave a Reply