PHPackages                             wildwolf/yubico-otp - 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. wildwolf/yubico-otp

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

wildwolf/yubico-otp
===================

Alternative to the official php-yubico client

4.0.1(10mo ago)628.4k↓33.8%1[1 issues](https://github.com/sjinks/yubico-otp/issues)[5 PRs](https://github.com/sjinks/yubico-otp/pulls)1MITPHPPHP ^8.1CI passing

Since Mar 17Pushed 1mo agoCompare

[ Source](https://github.com/sjinks/yubico-otp)[ Packagist](https://packagist.org/packages/wildwolf/yubico-otp)[ Fund](https://send.monobank.ua/jar/7rosVfiwKM)[ Fund](https://www.paypal.com/donate/?hosted_button_id=SAG6877JDJ3KU)[ RSS](/packages/wildwolf-yubico-otp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (16)Used By (1)

yubico-otp
==========

[](#yubico-otp)

[![CI](https://github.com/sjinks/yubico-otp/actions/workflows/ci.yaml/badge.svg)](https://github.com/sjinks/yubico-otp/actions/workflows/ci.yaml)[![Static Code Analysis](https://github.com/sjinks/yubico-otp/actions/workflows/static-code-analysis.yml/badge.svg)](https://github.com/sjinks/yubico-otp/actions/workflows/static-code-analysis.yml)[![Quality Gate Status](https://camo.githubusercontent.com/12d65d8477c9dd38d418d34c94b4c6abec470c584b114c3f8101833431d52ca0/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d736a696e6b735f79756269636f2d6f7470266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/summary/new_code?id=sjinks_yubico-otp)

PHP 7/8-friendly alternative to the official [php-yubico](https://github.com/Yubico/php-yubico) client.

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

[](#installation)

```
composer require wildwolf/yubico-otp
```

Usage
-----

[](#usage)

```
$otp      = new WildWolf\Yubico\OTP($id, $secret);
$response = null;
$result   = $otp->verify($code, null, &$response);
```

Where:

- `$id`, `$secret` are the Client ID and the secret key; you will need to [sign up](https://upgrade.yubico.com/getapikey/) for them;
- `$code` is the OTP code to verify (it will look something like `ccccccjknjjnfffttntuknrfnkednknkfjegcrhhkuut`; see `OTP::parsePasswordOTP()` for its format);
- `$result` is the verification result (`true` for success, `false` for failure);
- `$response` is the raw response from Yubico ([details](https://developers.yubico.com/OTP/Specifications/OTP_validation_protocol.html)).

`verify()` can throw `OTPBadResponseException` if the response fails the basic sanity checks, `OTPTamperedResponseException` if the response signature fails to validate, `OTPTransportException` in case of the issues talking to the OTP server.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance71

Regular maintenance activity

Popularity33

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 74.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 ~286 days

Recently: every ~317 days

Total

9

Last Release

325d ago

Major Versions

1.0.0 → 2.0.02022-01-05

2.0.1 → 3.0.02022-01-06

3.0.3 → 4.0.02025-06-26

PHP version history (3 changes)1.0.0PHP &gt;=7.0.0

2.0.0PHP ^7.4 || ^8.0

4.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1079712?v=4)[wildwolf](/maintainers/wildwolf)[@wildwolf](https://github.com/wildwolf)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (186 commits)")[![sjinks](https://avatars.githubusercontent.com/u/7810770?v=4)](https://github.com/sjinks "sjinks (63 commits)")

---

Tags

2faauthenticationotpphpsecurityyubicoyubico-otpotpsecurityAuthentication2fayubico

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wildwolf-yubico-otp/health.svg)

```
[![Health](https://phpackages.com/badges/wildwolf-yubico-otp/health.svg)](https://phpackages.com/packages/wildwolf-yubico-otp)
```

###  Alternatives

[salehhashemi/laravel-otp-manager

Laravel OTP manager

18713.2k](/packages/salehhashemi-laravel-otp-manager)[remotemerge/totp-php

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

2010.2k](/packages/remotemerge-totp-php)[jiripudil/otp

Library that generates and verifies one-time passwords.

2825.4k1](/packages/jiripudil-otp)[sicaboy/laravel-mfa

A Laravel package of Multi-factor Authentication (MFA/2FA) with a middleware.

101.2k](/packages/sicaboy-laravel-mfa)

PHPackages © 2026

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