Description
Google2FA for Laravel is an open-source package that adds two-factor authentication compatible with Google Authenticator to Laravel applications. It is a Laravel bridge to the Google2FA PHP package, which implements the HMAC-based one-time password algorithm from RFC 4226 and the time-based one-time password algorithm from RFC 6238. The package is meant for generating QR codes that users scan with an authenticator app and for checking the codes they type in. Recovery and backup codes are handled by a separate companion package. Version 3.x supports Laravel 5.4.36 up to Laravel 13 with PHP 7.0 through 8.5, while the legacy version 2.x remains available for projects that still need PHP 5. A playground, an example app and a demo page help you see it working. It is useful for Laravel developers who want to add 2FA without writing the OTP logic themselves.…
Highlights
- Google Authenticator-compatible 2FA for Laravel
- HOTP (RFC 4226) and TOTP (RFC 6238)
- QR code generation for enrollment
- Verification of user-entered codes
- Supports Laravel 5.4 through 13
Ratings & Reviews
No ratings yet
Be the first to rate Google2fa Laravel.
People also visit
FreeOTPPlus
Enhanced fork of FreeOTP-Android providing a feature-rich 2FA authenticator
Google2fa Laravel FAQ
What does this package do?
It lets Laravel apps create QR codes for Google Authenticator and verify the one-time codes users enter, using the Google2FA PHP library.
Which Laravel and PHP versions are supported?
Version 3.x supports Laravel 5.4.36 to 13.x with PHP 7.0 to 8.5. Version 2.x supports PHP 5.6 to 7.4 with Laravel 5.2 to 7.x.
How do I install the legacy version?
Run composer require pragmarx/google2fa-laravel:^2.0.
Does it create recovery codes?
No, use the separate Recovery package for backup and recovery codes.
Is there a demo?
Yes, there is a Google2FA package playground, an example app (google2fa-example) and a demo page.
What are the best Google2fa Laravel alternatives?
Popular alternatives to Google2fa Laravel include 2FAuth, Authme and 2fa. See all Google2fa Laravel alternatives


.png?auto=compress&fit=max&w=128)
