I have these endpoints:
urlpatterns += [
path('api-token-auth/', obtain_jwt_token),
path('api-token-verify/', verify_jwt_token),
path('api-token-refresh/', refresh_jwt_token),
path('api/', include(router.urls)),
]
For example I have a User on backend, and let's say he wants to login to the system. In login page he must provide his username and password, and login page will use "obtain_jwt_token" endpoint, which will automatically check if that user exists or not. If not, backend will return error message, if that User exists and username & password is correct than backend will return a Token, generated by JWT, and that token will live for let's say 1 hour. But the problem is that backend will not return additional data, it will return only Token itself, but not id of that user or something. And that is the problem.
Am I understanding something wrong ? All I want is for backend to return not only the Token, but also id of that user. Or to decode the Token, and get id of User from it.