PHPackages                             clef/instant2fa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. clef/instant2fa

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

clef/instant2fa
===============

A PHP client for Instant2FA.

1.0.1(9y ago)018[1 issues](https://github.com/clef/instant2fa-php/issues)MITPHPPHP &gt;=5.4

Since Nov 22Pushed 9y ago2 watchersCompare

[ Source](https://github.com/clef/instant2fa-php)[ Packagist](https://packagist.org/packages/clef/instant2fa)[ Docs](https://instant2fa.com)[ RSS](/packages/clef-instant2fa/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (6)Versions (5)Used By (0)

instant2fa-php
==============

[](#instant2fa-php)

A PHP client for [Instant2FA](https://instant2fa.com).

Installation
------------

[](#installation)

Install it with composer:

```
composer require clef/instant2fa

```

Requires PHP 5.4 or newer.

Usage
-----

[](#usage)

See our [integration guide](http://docs.instant2fa.com/) for a full walkthrough of the integration. The integration will take you about an hour.

Here's a flavor of the methods you'll be using:

```
$instant2fa = new \Instant2FA\Instant2FA([
    'access_key' => ACCESS_KEY,
    'access_secret' => ACCESS_SECRET
]);

$distinct_id = "A_UNIQUE_ID_FOR_A_GIVEN_USER";

// To show hosted 2FA settings:
$hosted_page_url = $instant2fa->create_settings($distinct_id);

// To show a hosted verification page:
try {
    $hosted_page_url = $instant2fa->create_verification($distinct_id);
    // Redirect to 2FA verification page
} catch (\Instant2FA\Error\MFANotEnabled $e) {
    // Log the user in as normal
}

// To see whether a user successfully completed 2FA verification:
$succeeded = $instant2fa->confirm_verification($distinct_id, $request->input('instant2faToken'));
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

2

Last Release

3499d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c08bccd006caa578f623e2cc1b5274651e6cf531e1b01fc6cf2233f47e5b501d?d=identicon)[jessepollak](/maintainers/jessepollak)

![](https://avatars.githubusercontent.com/u/700616?v=4)[Mark Hudnall](/maintainers/landakram)[@landakram](https://github.com/landakram)

---

Top Contributors

[![landakram](https://avatars.githubusercontent.com/u/700616?v=4)](https://github.com/landakram "landakram (8 commits)")

---

Tags

apiotpAuthentication2fatwo-factor

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/clef-instant2fa/health.svg)

```
[![Health](https://phpackages.com/badges/clef-instant2fa/health.svg)](https://phpackages.com/packages/clef-instant2fa)
```

###  Alternatives

[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[srmklive/authy

Plugin for enabling two-factor authentication in Laravel applications

6841.3k](/packages/srmklive-authy)[remotemerge/totp-php

Lightweight, fast, and secure TOTP (2FA) authentication library for PHP — battle tested, dependency free, and ready for enterprise integration.

2115.4k](/packages/remotemerge-totp-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
