|
| 1 | +<h1 align="center">MarkShust_DisableTwoFactorAuth</h1> |
| 2 | + |
| 3 | +<div align="center"> |
| 4 | + <p>Provides the ability to disable two-factor authentication.</p> |
| 5 | + <img src="https://img.shields.io/badge/magento-2.4-brightgreen.svg?logo=magento&longCache=true&style=flat-square" alt="Supported Magento Versions" /> |
| 6 | + <a href="https://packagist.org/packages/markshust/magento2-module-disabletwofactorauth" target="_blank"><img src="https://img.shields.io/packagist/v/markshust/magento2-module-disabletwofactorauth.svg?style=flat-square" alt="Latest Stable Version" /></a> |
| 7 | + <a href="https://packagist.org/packages/markshust/magento2-module-disabletwofactorauth" target="_blank"><img src="https://poser.pugx.org/markshust/magento2-module-disabletwofactorauth/downloads" alt="Composer Downloads" /></a> |
| 8 | + <a href="https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity" target="_blank"><img src="https://img.shields.io/badge/maintained%3F-yes-brightgreen.svg?style=flat-square" alt="Maintained - Yes" /></a> |
| 9 | + <a href="https://opensource.org/licenses/MIT" target="_blank"><img src="https://img.shields.io/badge/license-MIT-blue.svg" /></a> |
| 10 | +</div> |
| 11 | + |
| 12 | +## Table of contents |
| 13 | + |
| 14 | +- [Summary](#summary) |
| 15 | +- [Installation](#installation) |
| 16 | +- [Usage](#usage) |
| 17 | +- [License](#license) |
| 18 | + |
| 19 | +## Summary |
| 20 | + |
| 21 | +With the release of Magento 2.4, two-factor authentication (also known as 2FA) became enabled by default, with no |
| 22 | +ability to disable it in either the admin or console. However, there are situations which may require 2FA to be disabled |
| 23 | +or temporarily turned off, such as within development or testing environments. |
| 24 | + |
| 25 | +This module adds the missing toggle to turn 2FA on or off from the admin. It does this by hooking into the core code in |
| 26 | +a very seamless manner, just as would be done if this toggle existed in the core code. Installing this module should not |
| 27 | +open up any security holes, as it just works off of a simple config toggle which if not present, falls back to default |
| 28 | +functionality. |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +## Installation |
| 33 | + |
| 34 | +``` |
| 35 | +composer require markshust/magento2-module-disabletwofactorauth |
| 36 | +bin/magento module:enable MarkShust_DisableTwoFactorAuth |
| 37 | +bin/magento setup:upgrade |
| 38 | +``` |
| 39 | + |
| 40 | +## Usage |
| 41 | + |
| 42 | +This module keeps 2FA enabled by default. This is to prevent any unexpected side effects or security loopholes from |
| 43 | +being introduced during automated installation processes. |
| 44 | + |
| 45 | +After installing the module, one can disable 2FA by going to **Admin > Stores > Settings > Configuration > |
| 46 | +Security > 2FA**, and setting *Enable 2FA* to **No**. |
| 47 | + |
| 48 | +This setting can also be toggled to a 1 or 0 to respectively enable or disable 2FA from the command-line console: |
| 49 | + |
| 50 | +``` |
| 51 | +bin/magento config:set twofactorauth/general/enable 0 |
| 52 | +``` |
| 53 | + |
| 54 | +## License |
| 55 | + |
| 56 | +[MIT](https://opensource.org/licenses/MIT) |
0 commit comments