DRF - request.user returns None

2022-08-26 Thread Jackson Patrick
I am trying to get user using request.user and when printing gets None and in console it shows "Annoymous user". and am using simple jwt -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fro

DRF and React - request.user is "Anonymous user"

2022-09-11 Thread Jackson Patrick
I have used simple JWT for authentication and i have successfully logged in and am getting tokens also. But when i do a request.user in backend i get "Annonymous user". Tried passing Authorization header in axios post in FE REACT but it throws error. Am setting both refresh and access in a state va

Re: DRF and React - request.user is "Anonymous user"

2022-09-19 Thread Jackson Patrick
Do i need to pass token in headers? On Tue, 20 Sep, 2022, 9:44 am Mohammad Ehsan Ansari, wrote: > make sure you have listed auth as jwt and added permission class for > authentication > > On Monday, 12 September 2022 at 09:52:22 UTC+5:30 jacks...@gmail.com > wrote: > >> I have used simple JWT fo