I cant seem to login into my magento 2 backend. When I enter the correct credentials it just redirects me to the login page with no error. Debug, system and exception log are clean. Cache is cleaned already.

Thanks in advance!

  • Have you found a solution for this issue?
    – Gediminas
    Commented Jun 22, 2017 at 10:33

4 Answers 4


I had the same issue. Solved it by deleting my cookies.

  • 2
    After deleting all the cookies in Chrome 61.0.3163.91 I get ERR_TOO_MANY_REDIRECTS. This only happens in Chrome, Firefox works ok. Any idea why?
    – Andrei
    Commented Sep 25, 2017 at 12:38
  • This is not proper solution to get clear browser cookie every time. Is there any permanent solution? Commented Mar 8, 2020 at 6:05

This issue also shows up when there's an unknown bug in an extension that affects sales display (the dashboard shows sales data). In my case, I just ported an M1 module to M2 using the extremely helpful but seriously flawed Code Migration Toolkit (https://github.com/magento/code-migration). I then ran the command php bin/magento module:enable My_Module and restored my database (migrated from M1 to M2). I couldn't log in so I came across this Stack question and others like it telling me to clear cookies and remove rows from core_config_data. After 1 hour of head scratching, I realized it must be the last thing I did when admin login started to fail. It must be the module that I just enabled. So I disabled it and was able to log in.

Inspecting the code, I came across a configuration file etc/sales.xml that the CMT ported over from M1 to M2. This config file was trying to load a model using the old M1 class name my_module/quote_discount and failing. I commented this out and reenabled the module and was able to log in again.


I am also getting same issue but we have resolved it: For this command :

> php bin/magento config:set system/security/max_session_size_admin 2560000

And also update the core_config_data table:

> UPDATE core_config_data SET value = 7200 WHERE path = 'admin/security/session_lifetime';
> UPDATE core_config_data SET value = NULL WHERE (path = "web/cookie/cookie_domain" OR path = "web/cookie/cookie_path");

Resolved this above solution. Thanks


I just had same issue with Magento 2.3.1 after creating a clone site for testing. in firefox chrome, cleared Cache in firefox and its working

i also clean/flush cache of magento from terminal, deployed static content. no fix then cleared browser cache, Fixed issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.