Craft 4 plugin for two-factor or two-step login using Time Based OTP (TOTP, like Google Authenticator). Every user can setup TOTP themselves, the plugin does not force users. Admins can list usage in user tables.
Login works as usual for users without 2-factor auth.
When enabled, the user is redirected to the 2-factor verification page after login. This means the user is already logged in. When the user tries to visit an other Control Panel page than the public ones before verification, the logout is triggered. This blocks the user from visiting the CP unverified.
verifyBackEnd
to true
in the config file (this is the default).forceBackEnd
to true
if you want to prevent users from accessing the control panel without first enabling 2FA.When using a login for front end users, the following steps add 2FA support.
config/
folder.verifyFrontEnd
to true
in the config file.frontEndPathAllow
or frontEndPathExclude
! Using both will block everything! See config for additional info.verifyPath
. For our login-verify.twig
example the path would be login-verify
.settingsPath
. For our two-factor-settings.twig
example the path would be two-factor-settings
.Copy the two-factor-authentication.php file to your config/
folder.
Simply remove the user's twofactorauthentication_user
record. This disables 2FA for that user.
Copyright © Born05
See license