• Stars
    star
    199
  • Rank 195,430 (Top 4 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The DisableTwoFactorAuth module provides the ability to disable two-factor authentication.

MarkShust_DisableTwoFactorAuth

Provides the ability to disable two-factor authentication.

Supported Magento Versions Latest Stable Version Composer Downloads Maintained - Yes

Table of contents

Summary

With the release of Magento 2.4, two-factor authentication (also known as 2FA) became enabled by default, with no ability to disable it in either the admin or console. However, there are situations which may require 2FA to be disabled or temporarily turned off, such as within development or testing environments.

This module automatically disables 2FA while in developer mode (since version 2.0.0), and adds the missing toggle to turn 2FA on or off from the admin for other environments. It does this by hooking into the core code in a very seamless manner, just as would be done if this toggle existed in the core code. Installing this module should not open any security holes, as it just works off of a simple config toggle which, if not present, falls back to the default functionality.

You can also toggle 2FA back on while in developer mode, if you need to test your code functionality while 2FA is enabled.

Demo

Why

Why should you use this module? I hear all of the time that you can just disable Magento's 2FA module. There is a large inherent issue with doing this though.

When you disable a module, it updates the app/etc/config.php file with the removed module, which will eventually make its way upstream (accidentally committed to version control or unintendedly leaving your development environment). This will disable 2FA on staging/production, which is a big security concern. This module resolves this because you can keep it installed & enabled on dev/stage/prod, but control whether or not 2FA is enabled or disabled with configuration settings or environment variables. This means you can have it permanently disabled on dev, but have it permanently enabled in all other environments, all while keeping this module installed in all environments.

Installation

composer require markshust/magento2-module-disabletwofactorauth
bin/magento module:enable MarkShust_DisableTwoFactorAuth
bin/magento setup:upgrade

Usage

This module automatically disables 2FA in developer mode (since version 2.0.0). In any other deployment mode, 2FA is kept enabled by default. This is to prevent any unexpected side effects or security loopholes from being introduced during automated installation processes.

Disable 2FA

It may still be desirable to disable 2FA in non-production environments, such as within testing or internal staging environments. For these cases, 2FA is not automatically disabled. However, there are toggles to override the default Magento settings to disable 2FA within these environments.

You can also bypass 2FA for API token generation. This can be useful for third-party vendors during module development.

NOTE: Always keep 2FA enabled within production environments for security purposes.

2FA

To disable 2FA, visit Admin > Stores > Settings > Configuration > Security > 2FA and set Enable 2FA to No.

CLI: bin/magento config:set twofactorauth/general/enable 0

2FA for API Token Generation

To disable 2FA for API Token Generation, visit Admin > Stores > Settings > Configuration > Security > 2FA and set Enable 2FA for API Token Generation to No.

CLI: bin/magento config:set twofactorauth/general/enable_for_api_token_generation 0

Enable 2FA in developer mode

This module automatically disables 2FA while developer mode is enabled, but there may be situations when you need 2FA enabled during development. Rather than needing to disable this module, you can just disable this configuration setting in the admin.

To enable 2FA while in developer mode, visit Admin > Stores > Settings > Configuration > Security > 2FA and set Disable 2FA in Developer Mode to No.

CLI: bin/magento config:set twofactorauth/general/disable_in_developer_mode 0

License

MIT

More Repositories

1

docker-magento

Mark Shust's Docker Configuration for Magento
Shell
2,212
star
2

magento2-module-pagebuildersourcecode

The Page Builder Source Code module adds a Source Code button to the toolbar of the Page Builder WYSIWYG editor.
PHP
110
star
3

magento2-module-simpledata

The SimpleData module simplifies calling Magento data structures.
PHP
93
star
4

magento2-module-ordergrid

The Order Grid module adds more details to the order grid in the admin.
PHP
83
star
5

magento2-module-messages

The Messages module allows you to send success, notice, warning and error messages with HTML.
PHP
57
star
6

docker-magento2-php

This image is built from the official php repository and contains PHP configurations for Magento 2.
Shell
51
star
7

phpstorm-magento-live-templates

PHPStorm Live Templates for Magento 2
49
star
8

magento2-module-extrabodyclasses

The Extra Body Classes module adds the website and store codes to the body class attribute.
PHP
32
star
9

docker-magento2-nginx

This image is built from nginx and contains the default webserver configuration for Magento 2.
Shell
28
star
10

docker-meteor

Standard Dockerfile for deploying bundled Meteor apps.
Shell
25
star
11

magento2-modules

A curated list of all Mark's modules available for Magento 2.
24
star
12

firebase-keen

JavaScript
23
star
13

meteor-material-ui

Package that contains the React implementation of Google Material Design
JavaScript
19
star
14

magento2-module-layouthandlelogger

The LayoutHandleLogger module displays layout handles when in developer mode.
PHP
16
star
15

magento2-module-specialrouter

The SpecialRouter module adds the ability to use special characters in URLs.
PHP
12
star
16

magento2-module-twilio

The Twilio module sends SMS messages in response to Magento events.
PHP
12
star
17

magento2-module-example-set-theme-for-specific-route

This is an example of a Magento 2 module that sets the theme, but only for a specific route.
PHP
11
star
18

gptchain

Link multiple GPT prompts into a chain of responses.
Python
10
star
19

mantra-matui-mobx

This is an example Meteor 1.4 application utilizing Mantra, Material UI, & MobX.
JavaScript
10
star
20

learn-xdebug

HTML
9
star
21

Setup-an-Nginx-Proxy-for-a-Node.js-App-with-Docker

JavaScript
8
star
22

tessel-nfl

A script for the tessel that uses the NFL's ScoreScript JSON feed to check the scores for a specific game, and trigger an attached relay on a score.
JavaScript
8
star
23

docker-nginx-phpfpm-alpine

Basic Docker setup for running Nginx + PHP-FPM on Alpine Linux.
PHP
6
star
24

markshust.com-gatsby

Mark Shust's personal website built on the Gatsby framework
JavaScript
5
star
25

module-foobar

This repository contains code examples of Magento 2 modules.
PHP
5
star
26

Build-Release-and-Run-Containers-with-Docker-Compose

JavaScript
5
star
27

nginx-proxy-mkcert

Shell
5
star
28

todomvc-nodejs-mongoose-socketio

TodoMVC built with Node.js + Express + Mongoose + Socket.IO
JavaScript
4
star
29

twitter-nfl-liveupdate

Tweets NFL LiveUpdate data from Firebase
JavaScript
4
star
30

firebase-nfl-liveupdate

Syncs NFL LiveUpdate data to Firebase
JavaScript
4
star
31

magento2-module-removefavicon

The Remove Favicon module removes all favicons from the HTML head.
PHP
4
star
32

mantra-matui-redux

This is an example Meteor 1.4 application utilizing Mantra, Material UI, & Redux.
JavaScript
4
star
33

magento2-module-hierarchycomplexidcompatibility

The Hierarchy Complex ID Compatibility module makes the hierarchy compatible with long URL identifiers containing subpaths.
PHP
3
star
34

backupsites

This repository is made to sort and cleanup backup files on a linux server.
Shell
3
star
35

syncmedia

syncmedia is a shell script that syncs over the `media` folder in Magento installs.
Shell
3
star
36

WTF-is-React

JavaScript
3
star
37

mphp

MPHP is the most barebones PHP framework with as little overhead and dependencies as possible.
PHP
3
star
38

Proxy-Requests-for-Local-and-Remote-Service-Parity

JavaScript
3
star
39

meteor-radium

JavaScript
3
star
40

markshust.com

MDX
3
star
41

mplatform

PHP
3
star
42

drop-target-rank

Easily calculate the new rank value for drag-drop items given source & target values
JavaScript
3
star
43

Manage-Configuration-Values-with-Environment-Variables

How to update app code to look at environment variables for configuration values instead of using configuration files.
JavaScript
3
star
44

meteor-react-helloworld

Sample app demonstrating using Meteor + React together with FlowRouter.
JavaScript
2
star
45

syncdb

sycndb is a shell script that takes a mysqldump of a remote database, zips it up, copies it to your localhost, unzips it and loads it into a local database.
Shell
2
star
46

graphql-magento-2

PHP
2
star
47

Pipe-Log-Output-to-STDOUT-with-Docker

JavaScript
2
star
48

docker-nginx-phpfpm-percona-alpine

Basic Docker setup for running Nginx + PHP-FPM + Percona on Alpine Linux.
PHP
2
star
49

falcon

Deity Falcon - An Open Source, platform agnostic, headless PWA front-end library
JavaScript
2
star
50

LESS-CSS-General-Mixins

2
star
51

magento2-stackfile

Stackfile for deploying a Magento 2 site to Tutum
2
star
52

magento2-gulp

JavaScript
2
star
53

Scale-Docker-Horizontally-with-Nginx-Load-Balancing

JavaScript
2
star
54

magento2-metapackage-devtools-cli

A metapackage for Magento 2 providing dev tools for the CLI.
2
star
55

git-remotebranch

Shell
2
star
56

Build-a-Simple-Node.js-Web-Server-with-Docker

JavaScript
2
star
57

hymn-sample

JavaScript
2
star
58

Build-Your-Own-Custom-Docker-Image

2
star
59

sparta

PHP
2
star
60

Run-Stateless-Docker-Containers

JavaScript
1
star
61

url-encryption-decryption-magento-2

PHP
1
star
62

meteor-owl-carousel-2

Add Owl Carousel 2 to Meteor
JavaScript
1
star
63

magento-module-maintenance-key

Magento 2 module to enable maintenance mode viewing by parameter key
PHP
1
star
64

mongo-docker-backup-gcloud

Bash script to backup a MongoDB database to Google Cloud Storage through a Docker container
Shell
1
star
65

hello-github-actions

1
star
66

docker-meteor-ssl

This is an nginx proxy that will serve as SSL termination for a meteor app.
Nginx
1
star
67

docker-mongoclient

Docker image that has one thing: client to connect to a mongodb instance
1
star
68

m2demo

PHP
1
star
69

Configure-Prepack-with-Webpack

configuring Prepack to use Webpack with the Prepack Webpack Plugin.
JavaScript
1
star
70

bash-helper-functions

Quick & dirty bash helper functions to help with everyday tasks
Shell
1
star
71

percentage-circle

CSS
1
star
72

docker-ubuntu-trusty-lamp

1
star
73

Implement-a-Redux-Store-with-Easy-Peasy-React-Hooks

Implement a Redux Store with Easy Peasy & React Hooks
JavaScript
1
star
74

firebase-express-proxy

This script creates a simple proxy which passes GET requests to Firebase.
JavaScript
1
star
75

meteor-keen-js

JavaScript
1
star
76

markshust

1
star
77

shust.com

HTML
1
star
78

Bootstrap-a-Zero-Configuration-React-App-with-Neutrino

Setup a new React project with Neutrino with zero configuration.
JavaScript
1
star
79

hymn-composer

Compose React containers and feed data into components.
JavaScript
1
star
80

magento-markshust-sortcssjs

PHP
1
star
81

docker-lumen

Mark Shust's Docker Configuration for Lumen
Shell
1
star
82

docker-magento2-setup

This image has been deprecated.
Shell
1
star
83

hymn-core

Core API for Hymn.
JavaScript
1
star
84

optimistic-ui-laravel-vue

PHP
1
star
85

bezierjs

A nodejs and client-side library for (cubic) Bezier curve work
JavaScript
1
star
86

mongobackup.sh

This script syncs a mongodb backup to a Google Cloud Storage bucket.
Shell
1
star