Invalid Form Key. Please refresh the page. on magento admin login page

rodge picture rodge · Mar 18, 2016 · Viewed 36.4k times · Source

I have a weird situation again that I have encountered on Magento. A few hours ago, I successfully logged in to admin dashboard. After I logged out and restart my pc and tried to log in again. I got an error

Invalid Form Key. Please refresh the page.

Magento was installed on a live server. I didn't change anything or add something to the database. Credentials are valid but we cannot log in. Also, I cannot login to the Magento downloader panel.

What kind of bug is this?

How can we solve this?

UPDATE!

From @DouglasRadburn link. The detailed explanation of the problem and the possible solutions.

https://magento.stackexchange.com/questions/98220/security-patch-supee-7405-possible-problems/98236#98236

Also similar to @Makwana Ketan answer

Answer

stalinrajindian picture stalinrajindian · Mar 11, 2018

I am sure that problems came from session storage & cookie setting.

You should follow below:

DELETE FROM core_config_data WHERE path='web/cookie/cookie_domain';

DELETE FROM core_config_data WHERE path='web/cookie/cookie_path';

Delete all directories from below folders:

/var/session
/var/cache