PHPackages                             schotti/googleauthenticator - 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. schotti/googleauthenticator

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

schotti/googleauthenticator
===========================

Google Authenticator 2-factor authentication improved by Schotti

028PHP

Since Jan 15Pushed 10y agoCompare

[ Source](https://github.com/Schottii/GoogleAuthenticator)[ Packagist](https://packagist.org/packages/schotti/googleauthenticator)[ RSS](/packages/schotti-googleauthenticator/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

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

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

- Copyright (c) 2012,
- Author: Michael Kliewe, [@PHPGangsta](http://twitter.com/PHPGangsta)
- Licensed under the BSD License.

[![Build Status](https://camo.githubusercontent.com/0c6ed34c0a4ababb702f3bcc79129aa53703890d5340089bc699cfc0a39237bf/68747470733a2f2f7472617669732d63692e6f72672f5363686f747469692f476f6f676c6541757468656e74696361746f722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/Schottii/GoogleAuthenticator)

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

```

ToDo:
-----

[](#todo)

- ??? What do you need?

Notes:
------

[](#notes)

If you like this script or have some features to add: contact me, visit my blog, fork this project, send pull requests, you know how it works.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

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)")[![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)")[![yanniks](https://avatars.githubusercontent.com/u/993397?v=4)](https://github.com/yanniks "yanniks (1 commits)")

### Embed Badge

![Health badge](/badges/schotti-googleauthenticator/health.svg)

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

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.3M17](/packages/kartik-v-yii2-password)[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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