---
title: "Set Maximum Login Failures to Lockout Account in Magento 2"
url: "https://magecomp.com/blog/set-maximum-login-failures-to-lockout-account-magento-2/"
date: "2022-01-05T10:00:32+00:00"
modified: "2024-11-30T10:37:10+00:00"
author:
  name: "Gaurav Jain"
  url: "https://magecomp.com/"
categories:
  - "Magento Tutorials"
word_count: 185
reading_time: "1 min read"
summary: "Hello Magento Buddies,"
description: "In the Maximum Login Failures to Lockout Account field, enter the number of times a user can try to log in"
keywords: "Magento Tutorials"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Create User Role in Magento 2"
    url: "https://magecomp.com/blog/create-user-role-magento-2/"
  - title: "A Step by Step Guide to Setup RSS Feed in Magento 2"
    url: "https://magecomp.com/blog/setup-rss-feed-in-magento-2/"
  - title: "How to Add Product To Cart With Custom Price in Magento 2?"
    url: "https://magecomp.com/blog/add-product-to-cart-with-custom-price-magento-2/"
---

# Set Maximum Login Failures to Lockout Account in Magento 2

_Published: January 5, 2022_  
_Author: Gaurav Jain_  

![How to Set Maximum Login Failures to Lockout Account in Magento 2](https://magecomp.com/blog/wp-content/uploads/2021/12/How-to-Set-Maximum-Login-Failures-to-Lockout-Account-in-Magento-2-1024x512.webp)

Hello Magento Buddies,
Let us today check out how we can Set Maximum Login Failures to Lockout Account in Magento 2.
It basically means the number of attempts given to a user to log in to the account before it is locked. You can set this manually in the default Magento 2. The number of attempts set will be the number of attempts of login and after that, the account will be locked for the user. He will not be able to log in further.
![Mobile-OTP-Login](https://magecomp.com/blog/wp-content/uploads/2021/01/Mobile-OTP-Login.webp)

By default, Magento 2 provides 6 tries. If you want to give unlimited tries, then you can vacate the field. Normally, 3 attempts are given on websites.
## Steps to Set Maximum Login Failures to Lockout Account in Magento 2
- Navigate to Stores > Configuration - Then, go to Advanced > Admin.- Expand the Security section and set the Maximum Login Failures to Lockout Account to 3.
[![How to Set Maximum Login Failures to Lockout Account in Magento 2_1](https://magecomp.com/blog/wp-content/uploads/2021/12/How-to-Set-Maximum-Login-Failures-to-Lockout-Account-in-Magento-2_1.png)](https://magecomp.com/blog/wp-content/uploads/2021/12/How-to-Set-Maximum-Login-Failures-to-Lockout-Account-in-Magento-2_1.png)

## Bottom Line
That was pretty easy to configure.
This will enable you to set the maximum login failures to lock out the account in Magento 2. Integrate the [**Magento 2 Mobile OTP Login**](https://magecomp.com/magento-2-mobile-otp-login.html) which enables customers to log in quickly with their mobile number.


---

_View the original post at: [https://magecomp.com/blog/set-maximum-login-failures-to-lockout-account-magento-2/](https://magecomp.com/blog/set-maximum-login-failures-to-lockout-account-magento-2/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-07-30 13:32:42 UTC_  
