Skip to content

Give your endpoints a digital lock. Users receive a unique email code to unlock access — with built-in token expiration, brute-force protection, and clean modular code.

Notifications You must be signed in to change notification settings

Talabov/Universal-2FA-Door-Chip-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

🚪 Universal 2FA Door Chip API


Ever wished your app had a digital lock? This API is like a factory for secure digital chips: your users get a new "chip" (token) every time they log in, and only with the right code from their email do your protected endpoints open up.


How it works:

  1. Register – The user gets their chip:

    POST /register
    {
      "email": "[email protected]",
      "password": "your_password"
    }
  2. Login – The system sends a one-time code (key) to their email:

    POST /login
    {
      "email": "[email protected]",
      "password": "your_password"
    }
  3. Verify 2FA – Only with the right code can the door open:

    POST /verify-2fa
    {
      "email": "[email protected]",
      "code": 123456
    }
  4. Get your token ("chip") – Use it to unlock protected endpoints.


✅ Features

  • 🔐 Email-based two-factor authentication for any API or web app
  • 📨 Sends one-time codes to user’s email, no SMS required
  • 🚫 Anti-bruteforce: attempts are limited
  • 🗃️ User accounts and codes stored securely (SQLite)
  • 🐳 Docker-ready, quick setup, no dependencies hell

⛔ Error responses

{"message": "Invalid code"}
{"message": "Code has expired"}
{"message": "Too many attempts"}
{"message": "Failed to send 2FA email"}

⚙️ Setup

pip install -r requirements.txt
python app.py

Or with Docker:

docker build -t 2fa-door-chip-api .
docker run -p 5000:5000 2fa-door-chip-api

💼 Commercial use

Want to plug in a secure entry system for your project?
ZIP, Docker, and fast support included:

👉 Buy it on Gumroad


📬 Contact


Need it in another stack (Node.js, Go, etc)? Custom builds available.

About

Give your endpoints a digital lock. Users receive a unique email code to unlock access — with built-in token expiration, brute-force protection, and clean modular code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published