ai-agent

google2fa: 2FA Security

Add 2-factor authentication to your app with google2fa.
2,008 stars207 forksPHPGuide quality 8/10Updated 8/15/2026100% free · open source
What it does

Adds time-based one-time password authentication to your application, compatible with Google Authenticator, to enhance security with two-factor authentication

When to use it
  • When you need to secure user accounts with an additional layer of authentication beyond just passwords
  • When integrating with services that require two-factor authentication for enhanced security
  • When developing applications that handle sensitive user data and require robust authentication mechanisms
Ready-to-paste prompt
Google2FA::getQRCodeUrl('your_company', 'user@example.com', Google2FA::generateSecretKey())
Heads up: Make sure to store the secret key generated for each user securely, as losing this key will prevent the user from accessing their account
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

✅ Light setup

Installs with a command or two; your AI agent can do it for you.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/google2fa && curl -fsSL https://workflowstacks.com/api/skills/google2fa/claude-skill -o ~/.claude/skills/google2fa/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How google2fa: 2FA Security works
Codeflow
Free to inspect

Google2fa: 2FA Security is a small PHP project (~600 lines across 14 code files, plus 8 test files). Setup is light: install PHP, run one command. Last commit a month ago, MIT license, has a test suite.

Size
Small codebase
~600 lines · 14 code files · 5 min skim
Setup
Light setup
Install PHP, run one command.
Runs on
PHP
No API keys detected
PHP 97%Shell 3%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    composer.json
    Dependencies and the commands it exposes
  3. 3
    src/Google2FA.php
    Inside src/ — the main logic begins here
What's in each folder
src/Core code — the actual logic14 files
docs/Documentation1 files
.github/CI / automation (GitHub Actions)9 files
tests/Tests — proof it works8 files
READMEHas testsDocumentedCI checksMIT licenseUpdated this month
Quick Actions
Details
Creator
antonioribeiro
Language
PHP
Category
ai-agent
Published
9/21/2014

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.