--- id: django-allauth-2fa version: "0.12.0" license: unclear license_treatment: permissive maintenance: active --- # django-allauth-2fa — Adds two factor authentication to django-allauth License: permissive · Maintenance: active · Downloads: 91.3K/mo ## What it is and what it does django-allauth-2fa is a Django application that backports two-factor authentication to older versions of django-allauth (before 0.58.0). It integrates with django-allauth's authentication and account management system to add a second verification layer, supporting both time-based authenticator apps (displayed via QR code) and single-use backup codes for account recovery. The package depends on django-allauth, django-otp for OTP handling, Django itself, and qrcode for QR code generation. The package is explicitly intended as a stopgap for projects stuck on older django-allauth versions. If you are using django-allauth 0.56.0 or newer, the project's maintainers recommend using django-allauth's built-in MFA support instead. The package maintains compatibility with Django 4.1–4.2 and Python 3.8–3.11, and is actively maintained but in a limited capacity given its deprecated status for newer allauth versions. Use it for: - Add 2FA to a Django project using django-allauth < 0.58.0 without upgrading allauth. - Provide users with authenticator app support (TOTP) via QR code enrollment. - Generate and manage single-use backup codes for account recovery in case of lost authenticator. - Extend django-allauth's authentication workflow with a second verification factor for security-sensitive applications. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds two-factor authentication to django-allauth versions older than 0.58.0, supporting authenticator apps via QR code and single-use backup codes. Yes, if you are locked on django-allauth < 0.58.0 and need 2FA now. Low install friction, active maintenance, and no known vulnerabilities. However, strongly prefer upgrading to django-allauth 0.58.0+ and using its built-in MFA support if your project timeline allows—this package is a temporary bridge, not a long-term solution. ## Install pip install django-allauth-2fa uv add django-allauth-2fa poetry add django-allauth-2fa ## Installing django-allauth-2fa Before you install: Low install friction with a pure Python wheel. Actively maintained as of July 2026 with 218 repository stars. Note: the package is explicitly deprecated for django-allauth versions 0.58.0 and newer, which have built-in MFA support—verify your django-allauth version before installing. License in practice: Licensed under Apache Software License (permissive). No restrictions on commercial or private use. Quickstart: pip install django-allauth-2fa from django_allauth_2fa.views import setup_2fa # Add to Django urlpatterns and configure django-allauth, django-otp, and qrcode in settings Requires django-allauth < 0.58.0; incompatible with newer versions that have built-in MFA. Requires Django 4.1 or 4.2 and Python 3.8–3.11 per documented compatibility matrix. Verify before relying: - Whether the package works with Python versions beyond 3.11 or Django versions beyond 4.2. - Current maintenance cadence and response time for bug reports or security issues. - Whether the QR code generation and backup code workflows are production-ready for all use cases. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 91.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django two-factor authentication, django 2fa setup, django allauth mfa addon, django otp integration, django authenticator app support, django backup codes, django qr code authentication, django-auth, otp-totp, legacy-support [View on SkillFed](https://skillfed.io/packages/django-allauth-2fa) · [View on PyPI](https://pypi.org/project/django-allauth-2fa/)