400 error logging into local Craft 3 project I have just tried to log into an old local Craft 3 project that hasn't been worked on in a few months and I'm getting the following:

HTTP 400 – Bad Request – yii\web\BadRequestHttpException

Unable to verify your data submission.

yii\web\BadRequestHttpException: Unable to verify your data submission. in /Users/user/Development/project/build/vendor/yiisoft/yii2/web/Controller.php:166
Stack trace:
#0 /Users/user/Development/project/build/vendor/craftcms/cms/src/web/Controller.php(82): yii\web\Controller-&gt;beforeAction(Object(yii\base\InlineAction))
#1 /Users/user/Development/project/build/vendor/yiisoft/yii2/base/Controller.php(155): craft\web\Controller-&gt;beforeAction(Object(yii\base\InlineAction))
#2 /Users/user/Development/project/build/vendor/craftcms/cms/src/web/Controller.php(103): yii\base\Controller-&gt;runAction('login', Array)
#3 /Users/user/Development/project/build/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller-&gt;runAction('login', Array)
#4 /Users/user/Development/project/build/vendor/craftcms/cms/src/web/Application.php(282): yii\base\Module-&gt;runAction('users/login', Array)
#5 /Users/user/Development/project/build/vendor/craftcms/cms/src/web/Application.php(538): craft\web\Application-&gt;runAction('users/login', Array)
#6 /Users/user/Development/project/build/vendor/craftcms/cms/src/web/Application.php(266): craft\web\Application-&gt;_processActionRequest(Object(craft\web\Request))
#7 /Users/user/Development/project/build/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application-&gt;handleRequest(Object(craft\web\Request))
#8 /Users/user/Development/project/build/public/index.php(42): yii\base\Application-&gt;run()
#9 {main}


The front end of the site fine, the login page at /admin works and I've restarted MAMP multiple times. I have also locally run composer update in case there were any issues with my packages.

But nothing seems to make it want to successfully sign me in.

UPDATE:

After more research, a lot of people have had their issues like this resolved by clearing the cache of their browser. I have tried this in three separate browsers all to no improvement.
I haven't seen this particular issue but generally I've found that from time to time MAMP doesn't like running Craft in CGI mode, i.e. with different PHP versions per host.

Try switching it to module mode (under the PHP tab of MAMP Pro). If that works, then try reverting to CGI mode. You may find it continues to work.