Logto authentication integration for Django Rest Framework.
pip install drf-logto
Add "drf_logto" to INSTALLED_APPS list:
INSTALLED_APPS = [
"drf_logto",
]
Include "drf_logto.urls" in your project's urls.py:
from django.urls import path, include
urlpatterns = [
path("auth/", include("drf_logto.urls")),
]
Set AUTH_USER_MODEL in settings.py to "drf_logto.LogtoUser"
AUTH_USER_MODEL = "drf_logto.LogtoUser"
DRF_LOGTO = {
"WEBHOOK_HEADER_KEY": "Example-Webhook-Token",
"WEBHOOK_HEADER_VALUE": "sdfksdjfksjdfsdkfjsdkfjksdjf",
"SIGNUP_IDENTIFIER": "email",
}