GithubHelp home page GithubHelp logo

wearetradecraft / 2fa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dxw/2fa

0.0 2.0 0.0 1.35 MB

WordPress plugin for 2 factor authentication (TOTP and SMS)

License: MIT License

PHP 82.37% JavaScript 8.74% CSS 0.36% Dockerfile 0.28% Ruby 7.72% Shell 0.52%

2fa's Introduction

2fa

WordPress plugin for 2 factor authentication (TOTP and SMS)

Installation

At the moment this plugin must be installed on a multisite installation.

If you don't have a Twilio account, there's currently no way to hide SMS from the setup page.

To enable SMS authentication add these constants to your wp-config.php:

define('TWILIO_ACCOUNT_SID', 'AC...');
define('TWILIO_AUTH_TOKEN', '...');
define('TWILIO_NUMBER', '...');

You can find those here.

Usage

Super admins can decide which users must use 2FA. Users cannot opt to start using 2FA if it has not been enabled for their account.

Super admins can do this in two ways - setting an option on the user's profile to "enabled", or by checking the checkbox in the list of sites which forces all users of a site to use 2FA.

Users will then be forced to setup 2FA the next time they log in (it will not interrupt a user who is already logged in).

They have the option of using TOTP (apps like Google Authenticator) or SMS. And they can configure up to 2 devices (controlled by a constant).

Admins can also set the number of days users can skip requests for their second factor when logging in.

wp-cli command

% wp 2fa fails
% wp 2fa user alice
% wp 2fa reset bob

Tests

Note: Integration tests are executed by Travis, but the "restart" button may need to be pushed a few times before they pass.

Unit tests and linter:

% composer install
% vendor/bin/peridot spec
% vendor/bin/php-cs-fixer fix --dry-run -v --diff

Integration tests:

% tests/run-with-docker.sh

Licence

MIT

2fa's People

Contributors

mallorydxw avatar robjs avatar tamasdxw avatar robbiepaul avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.