PHPackages                             jc5/google2fa-laravel - 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. jc5/google2fa-laravel

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

jc5/google2fa-laravel
=====================

A One Time Password Authentication package, compatible with Google Authenticator.

2.0.10(1y ago)080.6k↑56%1[1 issues](https://github.com/JC5/google2fa-laravel/issues)1MITPHPPHP &gt;=8

Since Jun 20Pushed 1y agoCompare

[ Source](https://github.com/JC5/google2fa-laravel)[ Packagist](https://packagist.org/packages/jc5/google2fa-laravel)[ RSS](/packages/jc5-google2fa-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (32)Used By (1)

Google2FA for Laravel
=====================

[](#google2fa-for-laravel)

This is a slightly edited version of [this package](https://packagist.org/packages/pragmarx/google2fa-laravel) by [Antonio Carlos Ribeiro](https://github.com/antonioribeiro). In this version of the package, the 2FA authentication state is stored in a table + cookie, so the 2FA state can survive the end of the session.

**This package is not yet ready for production.**

I've chosen to remove most of the instructions from this readme, and I invite you to checkout the original readme file. I've done this to make sure that there won't be outdated instructions in this readme file.

 [![Latest Stable Version](https://camo.githubusercontent.com/8503e36f07cb43ec34bbe98b752ffe54ed22f675e11cc2cd1bc41ca30d381cd9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a63352f676f6f676c653266612d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jc5/google2fa-laravel) [![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE) [![Build](https://camo.githubusercontent.com/e5ebcb7e44fff4c7651dd0d490948f4c1f91bb256ee2ad7d93ea1455550e796b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a63352f676f6f676c653266612d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/jc5/google2fa-laravel)

 [![Downloads](https://camo.githubusercontent.com/700e47ec2e31e7611dd368f2cb4d395cd08e258afc9049f567d81729bf688ef0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a63352f676f6f676c653266612d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jc5/google2fa-laravel) [![PHP](https://camo.githubusercontent.com/f6c045c02b0dc666f5af38927a754816c6141d9cd0f9949864cc1e14b3abb9bb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e332d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/jc5/google2fa-laravel)

### Google Two-Factor Authentication Package for Laravel

[](#google-two-factor-authentication-package-for-laravel)

Google2FA is a PHP implementation of the Google Two-Factor Authentication Module, supporting the HMAC-Based One-time Password (HOTP) algorithm specified in [RFC 4226](https://tools.ietf.org/html/rfc4226) and the Time-based One-time Password (TOTP) algorithm specified in [RFC 6238](https://tools.ietf.org/html/rfc6238).

This package is a Laravel bridge to [Google2FA](https://github.com/antonioribeiro/google2fa)'s PHP package.

The intent of this package is to create QRCodes for Google2FA and check user typed codes. If you need to create backup/recovery codes, please check below.

### Recovery/Backup codes

[](#recoverybackup-codes)

if you need to create recovery or backup codes to provide a way for your users to recover a lost account, you can use the [Recovery Package](https://github.com/antonioribeiro/recovery).

Documentation
-------------

[](#documentation)

Check the ReadMe file in the main [Google2FA](https://github.com/antonioribeiro/google2fa) repository.

Tests
-----

[](#tests)

The package tests were written with [phpspec](http://www.phpspec.net/en/latest/).

Author
------

[](#author)

[Antonio Carlos Ribeiro](http://twitter.com/iantonioribeiro) and [James Cole](https://github.com/jc5).

License
-------

[](#license)

Google2FA is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

Contributing
------------

[](#contributing)

Pull requests and issues are more than welcome.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance49

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 68.5% 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 ~106 days

Recently: every ~349 days

Total

28

Last Release

379d ago

Major Versions

v0.3.0 → v1.0.02019-03-21

v1.3.0 → 2.0.02019-12-07

PHP version history (4 changes)v0.1.0PHP &gt;=5.4

v1.0.0PHP &gt;=7.0

2.0.0PHP &gt;=7.3

2.0.7PHP &gt;=8

### Community

Maintainers

![](https://www.gravatar.com/avatar/48108cc08b6a55e32067a7344558f8fd3169797407b7ebc28b16b82e726c3638?d=identicon)[TheGrumpyDictator](/maintainers/TheGrumpyDictator)

---

Top Contributors

[![antonioribeiro](https://avatars.githubusercontent.com/u/3182864?v=4)](https://github.com/antonioribeiro "antonioribeiro (178 commits)")[![JC5](https://avatars.githubusercontent.com/u/5889984?v=4)](https://github.com/JC5 "JC5 (33 commits)")[![asbiin](https://avatars.githubusercontent.com/u/25419741?v=4)](https://github.com/asbiin "asbiin (8 commits)")[![mfn](https://avatars.githubusercontent.com/u/87493?v=4)](https://github.com/mfn "mfn (6 commits)")[![it-can](https://avatars.githubusercontent.com/u/644288?v=4)](https://github.com/it-can "it-can (4 commits)")[![robincsamuel](https://avatars.githubusercontent.com/u/4545992?v=4)](https://github.com/robincsamuel "robincsamuel (4 commits)")[![Khristophor](https://avatars.githubusercontent.com/u/6796588?v=4)](https://github.com/Khristophor "Khristophor (3 commits)")[![h44z](https://avatars.githubusercontent.com/u/1370804?v=4)](https://github.com/h44z "h44z (3 commits)")[![zeyad82](https://avatars.githubusercontent.com/u/16030521?v=4)](https://github.com/zeyad82 "zeyad82 (2 commits)")[![derrickschoen](https://avatars.githubusercontent.com/u/13784912?v=4)](https://github.com/derrickschoen "derrickschoen (1 commits)")[![drakakisgeo](https://avatars.githubusercontent.com/u/1863506?v=4)](https://github.com/drakakisgeo "drakakisgeo (1 commits)")[![CyrilMazur](https://avatars.githubusercontent.com/u/464216?v=4)](https://github.com/CyrilMazur "CyrilMazur (1 commits)")[![irayoun](https://avatars.githubusercontent.com/u/37749197?v=4)](https://github.com/irayoun "irayoun (1 commits)")[![cyrildewit](https://avatars.githubusercontent.com/u/16477999?v=4)](https://github.com/cyrildewit "cyrildewit (1 commits)")[![cdn](https://avatars.githubusercontent.com/u/118273?v=4)](https://github.com/cdn "cdn (1 commits)")[![benrolfe](https://avatars.githubusercontent.com/u/474175?v=4)](https://github.com/benrolfe "benrolfe (1 commits)")[![Koozza](https://avatars.githubusercontent.com/u/1731647?v=4)](https://github.com/Koozza "Koozza (1 commits)")[![m1r0](https://avatars.githubusercontent.com/u/1612178?v=4)](https://github.com/m1r0 "m1r0 (1 commits)")[![arukompas](https://avatars.githubusercontent.com/u/8697942?v=4)](https://github.com/arukompas "arukompas (1 commits)")[![rbresjer](https://avatars.githubusercontent.com/u/11976380?v=4)](https://github.com/rbresjer "rbresjer (1 commits)")

---

Tags

laravelAuthenticationTwo Factor Authenticationgoogle2fa

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jc5-google2fa-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/jc5-google2fa-laravel/health.svg)](https://phpackages.com/packages/jc5-google2fa-laravel)
```

###  Alternatives

[pragmarx/google2fa-laravel

A One Time Password Authentication package, compatible with Google Authenticator.

1.0k15.5M63](/packages/pragmarx-google2fa-laravel)[pragmarx/google2fa-qrcode

QR Code package for Google2FA

12124.6M37](/packages/pragmarx-google2fa-qrcode)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)

PHPackages © 2026

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