Categories: How To

Fixed: Magento Customer Login Issue with Chrome

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.
  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]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate ?️ Certified Magento Developer?‍?. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.?

View Comments

Recent Posts

How to Add Tooltip in Checkout Shipping Field in Magento 2?

Hello Magento Friends, In today’s blog, I will explain How to Add Tooltip in Checkout…

2 days ago

How to Integrate and Use MongoDB with Laravel?

MongoDB is a popular NoSQL database that offers flexibility and scalability when handling modern web…

3 days ago

NodeJS | Callback Function

In NodeJS, callbacks empower developers to execute asynchronous operations like reading files, handling requests, and…

4 days ago

How to Show SKU in Order Summary in Magento 2?

Hello Magento Friends, In today’s blog, we will learn How to Show SKU in Order…

6 days ago

Best Colors to Use for CTA Buttons

The "Buy Now" and "Add to Cart" buttons serve as the primary call-to-action (CTA) elements…

1 week ago

Magento 2: How to Save Custom Field Value to quote_address for Multi-Shipping Orders

Hello Magento Friends, In Magento 2, the checkout process allows customers to choose multiple shipping…

1 week ago