Since the internet is introduced, it covers a wide range of online business activities for products and services known as E-commerce that allows people to buy or sell products online. To make the online transactions more secure and reliable, customers need to login to a website or web store. Magento is one of the best eCommerce platforms and provides flexible solutions to rapidly growing world which provides secure transactions to the customer using login system. Recently, while working on one Magento store, we came across a situation where the customer cannot login to their account from chrome browser. That’s why we would like to share the trick to resolve Magento customer login issue into chrome browser.

There may be several reasons like Magento upgrade, server change, from key error or cookie issue but in most of the cases, this situation is happening due to cookie problem or form key problem.

  1. Firstly, you need to check if form key has been passed properly or not? If it’s not, add following code at app\design\frontend\Themes\Yourtheme\template\persistent\customer\form\login.phtml
  2. If the form key is properly passed and still you are unable to login, you have to change cookie lifespan. Generally, default Magento cookie lifespan is set to 3600 (1 hour). Because the server timings of user’s computer and Magento cookie lifespan does not match always, to resolve this issue, you need to set the cookie lifetime to 86400 (1 day) through the Magento admin and your issue will be resolved.Go to Magento backend -> System -> Configuration -> Web -> Session and Cookie Management and
    Set cookie lifetime to 86400 and save. Everything will work as expected now.
    cookie lifespan setting
  3. After trying both the solutions above, if you still face an issue, you need to set cookie domain along with dot at the start of the domain and your login will again start working like a charm.

Don’t forget to smash the stars if this solution works for you. Let me know through commenting if you have more ideas or solutions to resolve the issue. Also, check out Magento 2 Admin Actions Log extension for tracking all the admin activities performed by various users of your store.
Happy Login!

Click to rate this post!
[Total: 17 Average: 3.3]