jc5 / google2fa-laravel
A One Time Password Authentication package, compatible with Google Authenticator.
Installs: 68 358
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 183
Open Issues: 1
Requires
- php: >=8
- laravel/framework: >=5.4.36
- pragmarx/google2fa-qrcode: ^1.0
Requires (Dev)
- orchestra/testbench: 3.4.*|3.5.*|3.6.*|3.7.*|4.*|5.*|6.*
- phpunit/phpunit: ~9
- roave/security-advisories: dev-master
Suggests
- bacon/bacon-qr-code: Required to generate inline QR Codes.
- pragmarx/recovery: Generate recovery codes.
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.
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.