simple jwt django
Step 1: Install the djangorestframework_simplejwt
package using pip.
Step 2: Add 'rest_framework_simplejwt'
to your INSTALLED_APPS
setting.
Step 3: Add 'rest_framework_simplejwt.authentication.JWTAuthentication'
to your DEFAULT_AUTHENTICATION_CLASSES
setting.
Step 4: Add 'rest_framework_simplejwt.views.TokenObtainPairView'
and 'rest_framework_simplejwt.views.TokenRefreshView'
to your URL patterns.
Step 5: Configure the token expiration settings in your Django settings file if needed.