authkits

Search Authkits

Search pages, documentation, and resources.

Security

Multi-factor Authentication

Protect user accounts with TOTP, email OTP, backup codes, and admin MFA enforcement.

TOTP

Authenticator app based one-time passwords.

Email OTP

Short-lived codes delivered to verified email addresses.

Backup Codes

Recovery codes for account access when MFA devices are lost.

Enable MFA

Enable the MFA module in your Authkits configuration.

settings.py
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
AUTHKITS = {
    "mfa": {
        "totp": True,
        "email_otp": True,
        "backup_codes": True,
    }
}

Enforce MFA for Admins

Require MFA before users can access protected admin routes.

settings.py
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
AUTHKITS = {
    "security": {
        "admin_2fa": True,
    }
}

Next Steps

Add rate limits to protect login, verification, and recovery flows.

Rate Limits