PHPackages                             inanepain/auth - 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. inanepain/auth

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

inanepain/auth
==============

Authentication adapters for common use cases.

1.3.0(3w ago)113UnlicensePHPPHP &gt;=8.5

Since Sep 12Pushed 3w ago1 watchersCompare

[ Source](https://github.com/inanepain/auth)[ Packagist](https://packagist.org/packages/inanepain/auth)[ Docs](https://github.com/inanepain/auth)[ RSS](/packages/inanepain-auth/feed)WikiDiscussions develop Synced today

READMEChangelog (2)Dependencies (6)Versions (6)Used By (0)

inanepain/auth [![icon](./icon.png "inanepain/auth")](./icon.png)
=================================================================

[](#inanepainauth-)

Table of Contents

- [![icon](./icon.png "inanepain/auth") inanepain/auth](#inanepainauth)
- [1. Install](#install)
- [2. Two-Factor Authentication](#two-factor-authentication)
    - [2.1. Generate Token](#generate-token)
    - [2.2. Verify OTP](#verify-otp)
    - [2.3. QRCode URL](#qrcode-url)

[![icon](./icon.png "inanepain/auth")](./icon.png) inanepain/auth
-----------------------------------------------------------------

[](#-inanepainauth)

Authentication adapters for common use cases.

1. Install
----------

[](#1-install)

composer

```
composer require inanepain/auth
```

2. Two-Factor Authentication
----------------------------

[](#2-two-factor-authentication)

Generating and verifying tokens and pins.

### 2.1. Generate Token

[](#21-generate-token)

```
$token = new \Inane\Auth\TwoFactor\Token('Inane');
echo "$token";
```

### 2.2. Verify OTP

[](#22-verify-otp)

```
$otp = new \Inane\Auth\TwoFactor\OneTimePin($token);
$valid = $otp->verifyOTP('612777');
```

### 2.3. QRCode URL

[](#23-qrcode-url)

```
// OTP URL (otpauth://)
$otpUrl = $token->getOTPUrl();
// OR
$imgBase64 = $token->getImageBase64();
```

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance95

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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 ~454 days

Total

4

Last Release

24d ago

PHP version history (2 changes)1.0.0PHP &gt;=8.1

1.3.0PHP &gt;=8.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1823594?v=4)[Philip Michael Raab](/maintainers/inanepain)[@inanepain](https://github.com/inanepain)

---

Top Contributors

[![inanepain](https://avatars.githubusercontent.com/u/1823594?v=4)](https://github.com/inanepain "inanepain (44 commits)")[![philipmraab](https://avatars.githubusercontent.com/u/177214788?v=4)](https://github.com/philipmraab "philipmraab (4 commits)")

---

Tags

2faauthenticationcomposerinanepainlibraryotpphptwo-factorotpauthAuthenticationlibrary2fatwo-factorinaneinanepain

### Embed Badge

![Health badge](/badges/inanepain-auth/health.svg)

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

###  Alternatives

[markshust/magento2-module-disabletwofactorauth

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

2312.9M10](/packages/markshust-magento2-module-disabletwofactorauth)[remotemerge/totp-php

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

2118.5k](/packages/remotemerge-totp-php)[scheb/2fa-backup-code

Extends scheb/2fa-bundle with backup codes support

184.1M40](/packages/scheb-2fa-backup-code)[kelunik/two-factor

Two factor authentication.

371.9k2](/packages/kelunik-two-factor)

PHPackages © 2026

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