Closed ibrahimyaacob92 closed 3 years ago
You should place access token in each request to get access to different parts of your API.
i understand that, but what if i wanted to get the logged in user's detail using the converted token ? What Django give me at the moment is pretty useless if i couldnt refer back to who is generating the token..
again It'd be nice if you have an example
Create view which return some user data and create endpoint to send authenticated request with your token. For example:
class CurrentUserView(APIView): ....permission_classes = [IsAuthenticated] ....serializer_class = AccountSerializer
def get(self, request):
return Response(data={"user": request.user})
How to get more data other than access & refresh token after it's being converted by Django ?