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

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

2 days ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

2 days ago

Magento 2: How to Add Header and Footer in Checkout

Hello Magento Friends, In today’s blog, we will discuss adding a header and footer to…

2 days ago

Understanding Flexbox Layout in React Native

Hello React Native Friends, Building a visually appealing and responsive mobile app is crucial in…

4 days ago

HYVĂ„ Themes Releases: 1.3.6 & 1.3.7 – What’s New

We're thrilled to announce the release of Hyvä Themes 1.3.6 and 1.3.7! These latest updates…

5 days ago

How Modern E-Commerce Platforms Leverage Docker & Kubernetes for Scalability

Your e-commerce platform is surging - orders are rolling in, traffic spikes are becoming the…

5 days ago