Migrate from django-rest-auth to dj-rest-auth in project which uses jwt

Viewed 203

I support the backend of a project that uses djangorestframework, django-rest-auth, and django-rest-framework-jwt. The frontend of this project is supported by other people.

Recently, the owner gave me the task to migrate the project to Django3.1 and the latest versions of other used packages. When migrating, I came across the fact that the django-rest-auth project has not been developed for more than two years and it is recommended to use its fork dj-rest-auth, and for JWT it is recommended to use django-rest-framework-simplejwt.

I replaced the dependencies in accordance with the recommendations, but faced with the incompatibility of the resulting API with the previous version. The django-rest-auth and django-rest-framework-jwt packages use the key "token" that the user's token is located on. For dj-rest-auth when using JWT, this is the key "access_token". It turns out that when one update the backend, the API authorization specification changes.

Is there any way to avoid this?

0 Answers
Related