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.
Also similar to @Makwana Ketan answer
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