PHPackages                             renangaleno/phpgoogleauthenticator - 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. renangaleno/phpgoogleauthenticator

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

renangaleno/phpgoogleauthenticator
==================================

PHP Class for handling Google Authenticator 2-factor authentication

0.1(10y ago)019BSD-4-ClausePHPPHP &gt;=5.3.0

Since Sep 9Pushed 10y ago1 watchersCompare

[ Source](https://github.com/RenanGaleno/PHPGoogleAuthenticator)[ Packagist](https://packagist.org/packages/renangaleno/phpgoogleauthenticator)[ RSS](/packages/renangaleno-phpgoogleauthenticator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Google Authenticator PHP class
==============================

[](#google-authenticator-php-class)

[![Build Status](https://camo.githubusercontent.com/b84f394762ba1d051fd3b1c5b014a299046242fde6b8251e306d2377536e2a29/68747470733a2f2f7472617669732d63692e6f72672f52656e616e47616c656e6f2f504850476f6f676c6541757468656e74696361746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/RenanGaleno/PHPGoogleAuthenticator)

This PHP class can be used to interact with the Google Authenticator mobile app for 2-factor-authentication. This class can generate secrets, generate codes, validate codes and present a QR-Code for scanning the secret.

For a secure installation you have to make sure that used codes cannot be reused (replay-attack).

Usage:
------

[](#usage)

See example files

```
php example1.php
Secret is: OQB6ZZGYHCPSX4AK

Google Charts URL for the QR-Code: https://www.google.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/infoATphpgangsta.de%3Fsecret%3DOQB6ZZGYHCPSX4AK

Checking Code '848634' and Secret 'OQB6ZZGYHCPSX4AK':
OK

```

Author
------

[](#author)

**Renan Galeno**

-

**Michael Kliewe**

-
-

License
-------

[](#license)

Licensed under the BSD License.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

3904d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/216df639bf1e5dea7d70899b657719ab3c8d03163cb7443f2d6f61ba0a7b51e6?d=identicon)[RenanGaleno](/maintainers/RenanGaleno)

---

Top Contributors

[![PHPGangsta](https://avatars.githubusercontent.com/u/608408?v=4)](https://github.com/PHPGangsta "PHPGangsta (12 commits)")[![symm](https://avatars.githubusercontent.com/u/69390?v=4)](https://github.com/symm "symm (6 commits)")[![r--w](https://avatars.githubusercontent.com/u/1191700?v=4)](https://github.com/r--w "r--w (4 commits)")[![RenanGaleno](https://avatars.githubusercontent.com/u/5055150?v=4)](https://github.com/RenanGaleno "RenanGaleno (3 commits)")[![yanniks](https://avatars.githubusercontent.com/u/993397?v=4)](https://github.com/yanniks "yanniks (1 commits)")[![alexandregz](https://avatars.githubusercontent.com/u/1374718?v=4)](https://github.com/alexandregz "alexandregz (1 commits)")[![edwardmp](https://avatars.githubusercontent.com/u/1686739?v=4)](https://github.com/edwardmp "edwardmp (1 commits)")[![34x](https://avatars.githubusercontent.com/u/60165?v=4)](https://github.com/34x "34x (1 commits)")

---

Tags

phpgoogleauthauthenticator

### Embed Badge

![Health badge](/badges/renangaleno-phpgoogleauthenticator/health.svg)

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

###  Alternatives

[socialconnect/auth

Social Connect Auth Component

568845.4k5](/packages/socialconnect-auth)[opauth/google

Google strategy for Opauth

129501.8k2](/packages/opauth-google)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2369.5k3](/packages/kinde-oss-kinde-auth-php)[lorenzoferrarajr/lfj-opauth

LfjOpauth is a Zend Framework 2 module that enables support for many authentication providers through the Opauth framework.

2915.4k](/packages/lorenzoferrarajr-lfj-opauth)[foglcz/ldap-authenticator

LDAP Authenticator plugin for Nette Framework

137.2k](/packages/foglcz-ldap-authenticator)

PHPackages © 2026

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