This project provides a simple stateless MFA (TOTP) code generator over an HTTP API using FastAPI.
- Stateless: no secrets are stored
- Simple API interface
- Useful for testing MFA integrations
Start the service using Docker:
docker build -t mfa-service .
docker run -p 8000:8000 mfa-serviceQuery Parameters:
secret(required): Base32-encoded TOTP secret
Response:
{
"code": "123456",
"time_remaining": 23,
"interval": 30
}curl "http://localhost:8000/mfa?secret=JBSWY3DPEHPK3PXP"- Docker or Python 3.11+