PHPackages                             leonis/google-authenticator - 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. leonis/google-authenticator

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

leonis/google-authenticator
===========================

Google Authenticator

2.0(5y ago)1860MITPHPCI failing

Since Apr 11Pushed 5y agoCompare

[ Source](https://github.com/yangliulnn/google-authenticator)[ Packagist](https://packagist.org/packages/leonis/google-authenticator)[ RSS](/packages/leonis-google-authenticator/feed)WikiDiscussions master Synced 1w ago

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

[![StyleCI](https://camo.githubusercontent.com/cc6d6254ee6e1dd4e9550975252571e538835f88e23751f582e0f864c4ceb489/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130363335373137362f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/106357176)[![Build Status](https://camo.githubusercontent.com/c19fee7649b250b6e78e6b6c732e95ce82f7e9505971248e3d50239a352b4881/68747470733a2f2f7777772e7472617669732d63692e6f72672f79616e676c69756c6e6e2f676f6f676c652d61757468656e74696361746f722e7376673f6272616e63683d6d6173746572)](https://www.travis-ci.org/yangliulnn/google-authenticator)[![Latest Stable Version](https://camo.githubusercontent.com/1c802a9731fe38891f2bb6243da7da23f916a1cd65ef8c4529eeff886e4dfe67/68747470733a2f2f706f7365722e707567782e6f72672f6c656f6e69732f676f6f676c652d61757468656e74696361746f722f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/leonis/google-authenticator)[![Total Downloads](https://camo.githubusercontent.com/3b323c30fc24232766a6d8d1038ddeac75a91d1474abe82f3e2f856be7b9f853/68747470733a2f2f706f7365722e707567782e6f72672f6c656f6e69732f676f6f676c652d61757468656e74696361746f722f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/leonis/google-authenticator)[![License](https://camo.githubusercontent.com/037cbdb17fe3335070736992b54f6653ee91d3678d1b5d83cec520b5bdf8b693/68747470733a2f2f706f7365722e707567782e6f72672f6c656f6e69732f676f6f676c652d61757468656e74696361746f722f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/leonis/google-authenticator)

google-authenticator
====================

[](#google-authenticator)

Google Authenticator Forked from [PHPGangsta/GoogleAuthenticator](https://github.com/PHPGangsta/GoogleAuthenticator)

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

[](#installation)

```
composer require leonis/google-authenticator

```

Usage
-----

[](#usage)

```
use \Leonis\GoogleAuthenticator\GoogleAuthenticator;

$secret = GoogleAuthenticator::secret();

$code = GoogleAuthenticator::code($secret);

$result = GoogleAuthenticator::verify($secret,$code);
```

License
-------

[](#license)

MIT

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity65

Established project with proven stability

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 ~403 days

Total

3

Last Release

2155d ago

Major Versions

1.0.1 → 2.02020-06-24

### Community

Maintainers

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

---

Tags

google-authenticatorphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/leonis-google-authenticator/health.svg)

```
[![Health](https://phpackages.com/badges/leonis-google-authenticator/health.svg)](https://phpackages.com/packages/leonis-google-authenticator)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

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