Magento Admin Invalid Form Key

May 30, 2018

Image for Magento Admin Invalid Form Key from unsplash.com

Problem

I Recently came across a situation where I couldn't log in to the Magento admin area, getting 'invalid form key on admin'.

Solution

Check the core_config_data table for web/cookie/cookie_domain and make sure that value is the same as your domain.

Update the database, clear Magento's cache, clear your browsers cookies and try logging in again.