--- id: django-otp version: "1.7.0" license: Unlicense license_treatment: permissive maintenance: aging --- # django-otp — A pluggable framework for adding two-factor authentication to Django using one-time passwords. License: permissive · Maintenance: aging · Downloads: 5.1M/mo ## What it is and what it does django-otp is a pluggable framework for adding one-time password authentication to Django projects. It integrates with Django's built-in authentication system to enable two-factor authentication without replacing the core auth backend. The package includes implementations of the standard HOTP and TOTP algorithms (RFC 4226 and RFC 6238) and supports a plugin architecture for additional OTP methods. The project is stable and production-ready but is aging—it is no longer actively developed by its original author, though the repository remains open to well-formed contributions. It targets developers who need to add OTP-based two-factor authentication to existing Django applications. For users seeking a more opinionated, higher-level solution, the description notes that django-two-factor-auth may be a better fit. Use it for: - Add two-factor authentication to a Django admin interface or user login flow using TOTP codes from authenticator apps. - Implement OTP-based account recovery or sensitive action verification in a Django web application. - Build a custom authentication flow that requires both password and one-time code validation. - Integrate hardware or software OTP generators into a Django-based identity management system. - Extend Django authentication with pluggable OTP methods tailored to specific security requirements. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds one-time password (OTP) support to Django applications, enabling two-factor authentication through HOTP and TOTP algorithms integrated with Django's authentication system. Yes, if you need OTP-based two-factor authentication in Django and can accept a stable but aging codebase. The package is production-ready, has no known vulnerabilities, and low install friction. However, the lack of active development means you should verify that any OTP plugins you need remain compatible with your Django version, and consider django-two-factor-auth if you prefer a more actively maintained, opinionated solution. ## Install pip install django-otp uv add django-otp poetry add django-otp ## Installing django-otp Before you install: Low install friction with a single runtime dependency on django. Maintenance status is aging—the project is stable and production-ready but no longer actively developed by its author, though well-formed issues and pull requests are welcomed. License in practice: Licensed under the Unlicense (permissive), placing the code in the public domain with no restrictions on use, modification, or distribution. Quickstart: pip install django-otp from django_otp.decorators import otp_required @otp_required def my_view(request): pass Requires Django to be installed and configured; integrates with django.contrib.auth but is not itself an authentication backend. Verify before relying: - Whether existing OTP plugins remain maintained and compatible with current Django versions. - Performance characteristics when handling high volumes of OTP validation requests. - Compatibility with modern authentication patterns beyond traditional two-factor flows. ## Package facts - License: Unlicense (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 5.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags django two-factor authentication, one-time password otp django, totp hotp implementation, django 2fa framework, otp plugins django, django authentication otp, two-factor auth django, two-factor-auth, otp, django-framework [View on SkillFed](https://skillfed.io/packages/django-otp) · [View on PyPI](https://pypi.org/project/django-otp/)