Installation

Ensure a secure authentication layer in your Django project by following these simple steps:

  1. Install the package
pip install drf_2fa
  1. Add drf_2fa to your INSTALLED_APPS in settings.py:
INSTALLED_APPS = [
    ...
    'drf_2fa',
    ...
]
  1. Configure DRF 2FA by referring to the Configuration Guide

  2. Apply database migrations:

python manage.py migrate
  1. Learn how to use DRF 2FA effectively in the Usage Guide