How to find user Information by token

8 views
Skip to first unread message

Prince Dewangan

unread,
Jul 3, 2020, 7:21:20 AM7/3/20
to django-res...@googlegroups.com
hi there,
     i am new Django and i have managed to build a small Api using DRF. I have        my angular client end posting user auth details and DRF returns a          token after login. so question is if posible to find user by token ? if          possible how i can get user information like {
   id, username, firstname, etc..}
   
     

sebastian wrzalek

unread,
Jul 3, 2020, 7:37:57 AM7/3/20
to Django REST framework
I dont know about built in token authenitication but you can easily do it with simpleJWT, decode token on client side to get user id, then you can create endpoint for retreiving user details.
Reply all
Reply to author
Forward
0 new messages