# Google2FA

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

Repository: https://github.com/antonioribeiro/google2fa
Canonical: https://ross.abutalabs.com/products/google2fa
Language: PHP
License: MIT
License Family: permissive
Topics: php, 2fa, two-factor-authentication, google2fa, agnostic, hacktoberfest, hacktoberfest-accepted
Last push: 2026-08-15T13:28:10+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 16, longevity 100
- inputs: {"age_days": 4364, "days_push": 18, "days_rel": 348, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2007, forks 207 (observed 2026-08-28T04:06:04.760135+00:00)

## What it is
A PHP library implementing Google-compatible two-factor authentication via HMAC-based (HOTP, RFC 4226) and time-based (TOTP, RFC 6238) one-time passwords. It is framework-agnostic with an optional Laravel bridge package.

## Use cases
- add two-factor authentication to a PHP app
- generate and verify TOTP codes compatible with Google Authenticator
- implement HOTP one-time passwords in PHP
- enable 2FA in a Laravel project
- generate QR code provisioning URIs for authenticator apps

## When to choose
- you need standards-compliant TOTP/HOTP 2FA in PHP
- you want Google Authenticator compatibility
- you use Laravel and want an easy integration bridge

## When to avoid
- you need SMS or push-based 2FA rather than authenticator-app OTPs
- your project is not PHP-based
- you need a full turnkey 2FA UI/flow rather than a library

## Facets
- artifact type: library
- maturity: stable
- function: auth, security
- domain: security, web-development, backend
- platform: php
- tags: totp, hotp, two-factor-authentication, google-authenticator, otp, laravel

## Member repositories
- antonioribeiro/google2fa (main) score 69
- antonioribeiro/google2fa-laravel (plugin) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:04.760135+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:01:19.878853+00:00, confidence not recorded.
  - readme: https://github.com/antonioribeiro/google2fa (fetched 2026-08-28T04:06:04.760135+00:00, sha 4ebbcb59893b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
