PHPackages                             ideo/otpauth - 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. [Security](/categories/security)
4. /
5. ideo/otpauth

ActiveLibrary[Security](/categories/security)

ideo/otpauth
============

Provides necessary processing for TOTP.

0.1(8y ago)016Apache-2.0PHPPHP &gt;=5.6.4

Since Nov 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/aideo/otpauth)[ Packagist](https://packagist.org/packages/ideo/otpauth)[ RSS](/packages/ideo-otpauth/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

ideo/otpauth
============

[](#ideootpauth)

[![Build Status](https://camo.githubusercontent.com/9a46dc245e128b65b784f521eb094b108b3f802b2b61bfabed999e7983f2ad18/68747470733a2f2f7472617669732d63692e6f72672f616964656f2f6f7470617574682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aideo/otpauth)

Provides necessary processing for TOTP.

For pin generation and authentication, it is based on the implementation of google-authenticator.

-

Usage
-----

[](#usage)

Generation of QR code for TOTP compatible applications.

```
$keyGenerator = new KeyGenerator();
$qrCodeGenerator = new QrCodeGenerator();

// Generate keys randomly, save this key in association with the target account.
$keyBytes = $keyGenerator->generateRandom(10);

$qrDataUri = $qrCodeGenerator->getQrCodeDataUri($keyBytes, 'sample@foo.bar', 'Sample');

```

Authentication using pin.

```
// It reads the key of the target account and compares it with the input pin.
$passcodeGenerator = new PasscodeGenerator(new HMacSigner($keyBytes));
$counter = new TotpCounter();
$time = time();

$valid = $passcodeGenerator->verifyTimeoutCode($pin, $counter->getValueAtTime($time));

```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3137d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1166307?v=4)[Kouichi Machida](/maintainers/cosmicvelocity)[@cosmicvelocity](https://github.com/cosmicvelocity)

---

Top Contributors

[![cosmicvelocity](https://avatars.githubusercontent.com/u/1166307?v=4)](https://github.com/cosmicvelocity "cosmicvelocity (11 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ideo-otpauth/health.svg)

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

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.0M137](/packages/mews-purifier)[getkirby/cms

The Kirby core

1.5k567.4k436](/packages/getkirby-cms)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[jason-munro/cypht

Lightweight Open Source webmail written in PHP and JavaScript

1.6k154.8k](/packages/jason-munro-cypht)[typo3/cms-core

TYPO3 CMS Core

3312.9M4.8k](/packages/typo3-cms-core)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24772.0k35](/packages/paragonie-ecc)

PHPackages © 2026

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