'dj_rest_auth uses 'access_token', 'refresh_token' whereas drf_simple_jwt uses 'access', 'token' - how to make it work together?

I'm using dj-rest-auth. To use jwt I also installed django-rest-framework-simplejwt.

The problem is that the first one uses token names like this:

access_token refresh_token

whereas the second one uses

access refresh

But they are supposed to be working together. For example, in dj-rest-auth docs, they say I should use auth/token/refresh which works but it takes refresh and returns access.

How to make it work together - to use the same names for tokens?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source