• Stars
    star
    142
  • Rank 258,495 (Top 6 %)
  • Language
    PHP
  • License
    Other
  • Created over 8 years ago
  • Updated almost 2 years ago

Reviews

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

Repository Details

Vendor-Agnostic Two-Factor Authentication

Multi-Factor

Designed to be a vendor-agnostic implementation of various Two-Factor Authentication solutions.

Developed by Paragon Initiative Enterprises for use in our own projects. It's released under a dual license: GPL and MIT. As with all dual-licensed projects, feel free to choose the license that fits your needs.

Requirements

Installing

composer require paragonie/multi-factor

Example Usage

<?php
use ParagonIE\MultiFactor\OneTime;
use ParagonIE\MultiFactor\OTP\TOTP;

$seed = random_bytes(20);

// You can use TOTP or HOTP
$otp = new OneTime($seed, new TOTP());

if (\password_verify($_POST['password'], $storedHash)) {
    if ($otp->validateCode($_POST['2facode'], time())) {
        // Login successful    
    }
}

More Repositories

1

random_compat

PHP 5.x support for random_bytes() and random_int()
PHP
8,170
star
2

awesome-appsec

A curated list of resources for learning about application security
PHP
6,305
star
3

paseto

Platform-Agnostic Security Tokens
PHP
3,248
star
4

halite

High-level cryptography interface powered by libsodium
PHP
1,124
star
5

sodium_compat

Pure PHP polyfill for ext/sodium
PHP
894
star
6

constant_time_encoding

Constant-Time Character Encoding in PHP Projects
PHP
816
star
7

easydb

Easy-to-use PDO wrapper for PHP projects.
PHP
736
star
8

csp-builder

Build Content-Security-Policy headers from a JSON file (or build them programmatically)
PHP
543
star
9

chronicle

Public append-only ledger microservice built with Slim Framework
PHP
469
star
10

ciphersweet

Fast, searchable field-level encryption for PHP projects
PHP
436
star
11

airship

Secure Content Management for the Modern Web - "The sky is only the beginning"
PHP
418
star
12

sapient

Secure API Toolkit
PHP
314
star
13

anti-csrf

Full-Featured Anti-CSRF Library
PHP
297
star
14

certainty

Automated cacert.pem management for PHP projects
PHP
262
star
15

EasyRSA

Simple and Secure Wrapper for phpseclib
PHP
198
star
16

password_lock

Wraps Bcrypt-SHA2 in Authenticated Encryption
PHP
190
star
17

sodium-plus

Developer-friendly libsodium interface
JavaScript
171
star
18

gpg-mailer

GnuPG-encrypted emails made easy
PHP
96
star
19

pecl-libsodium-doc

Free Online Documentation for the Libsodium PHP Extension
88
star
20

typed-arrays

Userland typed array implementation
PHP
74
star
21

ciphersweet-js

Searchable Encryption for Node.js projects
JavaScript
65
star
22

hidden-string

The HiddenString class extracted from Halite.
PHP
64
star
23

corner

Exceptions and Errors made more user-friendly
PHP
62
star
24

paseto-io

Paseto Website
Twig
58
star
25

iaso

Powerful JSON Toolkit, includes a JSON parser immune to Hash-DoS attacks
PHP
51
star
26

easy-ecc

High-Level Usability Wrapper for PHPECC
PHP
44
star
27

hpkp-builder

Build HTTP Public-Key-Pinning headers from a JSON file (or build them programmatically)
PHP
41
star
28

seedspring

Seeded, Deterministic PRNG (based on AES-CTR instead of LCG)
PHP
39
star
29

passwdqc

Password/passphrase strength checking and enforcement (PHP port)
PHP
39
star
30

pharaoh

Utility to quickly and effectively diff two PHP Archives
PHP
36
star
31

libgossamer

Public Key Infrastructure without Certificate Authorities, for WordPress and Packagist
PHP
33
star
32

ionizer

Input Filter System for PHP Software
PHP
32
star
33

easydb-cache

EasyDB with Prepared Statement Caching
PHP
30
star
34

argon2-refiner

Generate Parameter Recommendations for Argon2id in PHP 7.3+
PHP
25
star
35

bsidesorl-2017

Supplementary Material for Building Defensible Solutions to Weird Problems
PHP
23
star
36

blakechain

Hash chains built with BLAKE2b
PHP
22
star
37

quill

Library for quickly and easily writing data to a Chronicle instance
PHP
21
star
38

stern

Stern lets you built type-safe PHP projects, even if your project's users aren't writing type-safe code
PHP
21
star
39

herd

Hash-Ensured Replicated Database
PHP
16
star
40

eloquent-ciphersweet

Bridge library between Eloquent ORM and CipherSweet
PHP
14
star
41

discretion

On-demand and reusable contact forms that only send GnuPG-encrypted messages to your inbox.
PHP
13
star
42

xchacha20-js

JavaScript implementation of ChaCha20, HChaCha20, and XChaCha20
JavaScript
12
star
43

pco_prototype

PCO - PHP Crypto Objects
PHP
12
star
44

paserk-php

PHP Implementation of PASERK
PHP
12
star
45

slim-sapient

Slim Framework Adapter for Sapient
PHP
10
star
46

airship-docs

Documentation for CMS Airship
Nginx
10
star
47

php-jwt-guard

Security Defense for Firebase's PHP-JWT Library
PHP
9
star
48

zend-diactoros-sapient

Zend Diactoros Adapter for Sapient
PHP
8
star
49

phone-to-pick

Whitelist Your Incoming Phone Calls (for Android)
Java
7
star
50

gossamer-server

Standalone Gossamer server
PHP
5
star
51

poly1305-js

JavaScript implementation of the Poly1305 one-time authenticator
JavaScript
5
star
52

paseto-browser.js

PASETO in the Web Browser
JavaScript
4
star
53

airship-barge

Build Gadgets for Airship projects (Command Line Interface)
PHP
3
star
54

monolog-quill

A Monolog Handler for writing to a Chronicle instance
PHP
3
star
55

sodium-jvm

Pure-Java implementation of the Sodium cryptography library.
3
star
56

blogpost-translations

Translations of Paragon Initiative Enterprise blog posts
2
star
57

ward-docs

Online Documentation for Ward (Web Application Realtime Defender)
2
star
58

php71_crypto

Pluggable Cryptography Interface for PHP 7.1
2
star
59

ristretto-php

Implements a type-safe API for working with the Ristretto Group in PHP projects.
PHP
2
star
60

node-halite

High-level cryptography interface powered by node-sodium
1
star
61

pie-hosted.com

Source code for the pie-hosted.com website
PHP
1
star
62

halite-legacy

Legacy versions of Halite to facilitate migrations from older ciphersuites to the latest supported version
PHP
1
star
63

certainty-js

Certainty-js: Automated CACert.pem Management for Node.js Software
JavaScript
1
star