error 'Invalid security or form key. Please refresh the page' displays after login to admin backend Then refresh the page, the msg disappear.
First, try to refresh the page. There can be many reasons behind this error. Still facing the same issue then try the following solutions.
1. Try changing your base URL.
It can be possible that your base URL is not recognized by Magento 2 system. generally, it is possible when you are working in localhost. Run the following command to change the URL.
php bin/magento setup:store-config:set --base-url="http://127.0.0.1:8080/"
Flush your cache once you change the URL.
2. Maximize the max_input_vars in the php.ini file.
The default value of max_input_vars in php.ini is set to 1000. Edit the value from 1000 to 5000 and then save the file.
Hope this will help you!
If not, feel free to contact us.
Accept as a solution and click KUDOS.
hi @namitapare2a78 after refresh the page, the msg disappear. but when I login admin again. it's still to show error msg
Thanks for your reply!
Kindly try the other solutions I have mentioned.
@namitapare2a78 thank you.
i change max_input_vars 10000 to 50000 and checked base URL but it's still not work.
it's happen on magento cloud but on Docker not found this issue