# antonioribeiro/google2fa

> PHP implementation of TOTP and HOTP two-factor authentication

Navigation: [Security](category/security.txt) · [Index](../llms.txt)

## Facts

- GitHub: https://github.com/antonioribeiro/google2fa
- HTML: https://awesomeopensource.dev/project/antonioribeiro-google2fa
- License: MIT
- Language: PHP
- stars: 2013
- Topics: 2fa, agnostic, google2fa, hacktoberfest, hacktoberfest-accepted, php, two-factor-authentication
- Activity score: 2.6/5 (Maintained)
- Last commit (any branch): 2026-08-15
- Last release: v9.0.0 2025-09-19

## Description

A PHP library that implements Google Authenticator-compatible two-factor authentication with the time-based TOTP algorithm from RFC 6238 and the counter-based HOTP algorithm from RFC 4226. It generates secrets, provisioning URIs and QR-code URLs for authenticator apps, then verifies submitted codes, with options for the verification window. Framework-agnostic and installed through Composer as pragmarx/google2fa, it supports PHP 7.4 through 8.6.

## Maintenance activity

- Recency: 50% (weight 40%) — last commit: 90 days ago
- Commit volume: 27% (weight 25%)
- Releases: 10% (weight 25%) — last release: 420 days ago
- Bug fixes: 100% (weight 10%)
- Commits: 0 / 90d, 23 / 365d

## Screenshots

- [Screenshot of the Google2FA playground showing the secret key and QR code form with validation results](https://awesomeopensource.dev/uploads/1695/6b49d2cd1c12771a.jpg)

## Similar projects

- [aquasecurity/trivy](aquasecurity-trivy.md): Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more · Activity score 5.0/5 (Thriving)
- [wazuh/wazuh](wazuh-wazuh.md): The Open Source Security Platform. Unified XDR and SIEM protection for endpoints and cloud workloads. · Activity score 5.0/5 (Thriving)
- [anchore/grype](anchore-grype.md): Scans container images, filesystems and SBOMs for known vulnerabilities · Activity score 5.0/5 (Thriving)
- [greenbone/openvas-scanner](greenbone-openvas-scanner.md): Greenbone Community Edition scan engine with a continuously updated test feed · Activity score 5.0/5 (Thriving)
- [crowdsecurity/crowdsec](crowdsecurity-crowdsec.md): the open-source and participative IPS able to analyze visitor behavior & provide an adapted response to all kinds of attacks. · Activity score 4.9/5 (Thriving)
- [projectdiscovery/nuclei](projectdiscovery-nuclei.md): YAML template-based vulnerability scanner for HTTP, DNS, TCP and code targets · Activity score 4.8/5 (Thriving)
