dj-rest-auth migration#
By example, you can use agent skill
dmr-from-dj-rest-auth
when you already have an existing dj-rest-auth installation
and want to migrate it to django-modern-rest.
Important
LLM-generated migrations cannot guarantee strict behavioral parity. Always review and validate migrated auth flows, cookie flags, CSRF behavior, token lifetimes, email verification enforcement, and error semantics before production use.
Auth is the part of your system where a silent regression is most expensive. Treat the agent’s output as a draft for human review.
Warning
This migration is not a drop-in backend swap.
dj-rest-auth is a Django REST Framework layer on top of
django-allauth. We do not reimplement account management:
django-allauth keeps owning registration, email verification,
password reset, social login, MFA, and passkeys through its
headless mode,
while django-modern-rest owns your own API surface
and the auth classes that read allauth’s credentials.
That means endpoint paths and payloads change, and every API client must be updated. Plan it as a coordinated frontend and backend migration.
How to use in Codex#
Point Codex to your auth URL wiring,
REST_AUTHsettings, any overridden serializers, and the test suite.Ask Codex to use the skill
$dmr-from-dj-rest-auth.Migrate one flow at a time and run project CI after each one.
You can use prompt like this:
$dmr-from-dj-rest-auth Migrate `apps/accounts/` from dj-rest-auth to
django-modern-rest with django-allauth headless. Keep the same flows,
the same permissions, and the same security posture: cookie flags,
CSRF behavior, and whether the current password is required.
List every path and payload change as approved drift, re-attach the
side effects of our custom RegisterSerializer, migrate flow-by-flow,
and run the repository test commands after each flow.
How to use in Claude Code#
Add the marketplace and install the plugin:
/plugin marketplace add wemake-services/django-modern-rest
/plugin install dmr-from-dj-rest-auth@django-modern-rest
Verify the plugin is installed and enabled:
/plugin
Invoke the skill:
/dmr-from-dj-rest-auth
Then describe migration scope and constraints in a normal prompt.
See Agent skills for other agents.
What is migrated#
dj_rest_authlogin, logout, password change, and password reset views todjango-allauthheadless endpointsdj_rest_auth.registrationanddj_rest_auth.mfato theirdjango-allauthheadless equivalentsSocial login views to allauth’s provider endpoints
rest_user_details, which allauth does not serve, to your ownControllerwith typed DTOsDRF authentication classes to How authentication works auth classes
REST_AUTHsettings, which become code rather than configurationsimplejwtverify and refresh views toVerifyTokenSyncControllerandRefreshTokenSyncController
Account business logic stays in django-allauth by design.
What needs human attention#
The skill reports these explicitly, and they are worth reading carefully:
Security posture changes. Cookie flags, CSRF behavior, token lifetime, and whether a token is readable by JavaScript. The skill reports these separately from ordinary drift.
Custom serializer side effects. Projects hide provisioning, invites, billing, and audit records inside overridden serializers. These do not move automatically and must be re-attached to an allauth adapter or signal.
Client updates. Every approved path or payload change is a change your frontend has to make too.