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:
-
Register – The user gets their chip:
POST /register { "email": "[email protected]", "password": "your_password" }
-
Login – The system sends a one-time code (key) to their email:
POST /login { "email": "[email protected]", "password": "your_password" }
-
Verify 2FA – Only with the right code can the door open:
POST /verify-2fa { "email": "[email protected]", "code": 123456 }
-
Get your token ("chip") – Use it to unlock protected endpoints.
- 🔐 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
{"message": "Invalid code"}
{"message": "Code has expired"}
{"message": "Too many attempts"}
{"message": "Failed to send 2FA email"}
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
Want to plug in a secure entry system for your project?
ZIP, Docker, and fast support included:
- Email: [email protected]
- Telegram: @talabovali
Need it in another stack (Node.js, Go, etc)? Custom builds available.