jc5/google2fa-laravel

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

Package info

github.com/JC5/google2fa-laravel

pkg:composer/jc5/google2fa-laravel

Statistics

Installs: 87 309

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 1

2.0.10 2025-05-05 04:27 UTC

Requires

Requires (Dev)

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT 7b521b07c60786719d74c12c1d6306f5add0d998

  • Antonio Carlos Ribeiro <acr.woop@antoniocarlosribeiro.com>
  • James Cole <james.woop@firefly-iii.org>

AuthenticationlaravelTwo Factor Authenticationgoogle2fa


README

This is a slightly edited version of this package by Antonio Carlos Ribeiro. 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
👁 License
👁 Build

👁 Downloads
👁 PHP

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 and the Time-based One-time Password (TOTP) algorithm specified in RFC 6238.

This package is a Laravel bridge to 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

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.

Documentation

Check the ReadMe file in the main Google2FA repository.

Tests

The package tests were written with phpspec.

Author

Antonio Carlos Ribeiro and James Cole.

License

Google2FA is licensed under the MIT License - see the LICENSE file for details

Contributing

Pull requests and issues are more than welcome.