yes you need On Tue, 20 Sept 2022 at 09:49, Jackson Patrick <[email protected]> wrote:
> Do i need to pass token in headers? > > On Tue, 20 Sep, 2022, 9:44 am Mohammad Ehsan Ansari, <[email protected]> > 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 [email protected] >> wrote: >> >>> 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 variable and >>> store it in local storage . Am really new into this and I'm totally stuck >>> here. >>> >>> All i did was to temporarily solve the issue is to send the user id from >>> frontend to backend and by the way it's a bad practice. >>> >>> So please help me out in this guys. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/1f69ceeb-7294-4d51-a25c-b1a222c534d0n%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/1f69ceeb-7294-4d51-a25c-b1a222c534d0n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAG2dbb0KZ79AbF35cuyq9Rk%2BkC1v8-YwCJeQN5xFrwvG%3DgSnNw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAG2dbb0KZ79AbF35cuyq9Rk%2BkC1v8-YwCJeQN5xFrwvG%3DgSnNw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF8ux6LhGJ8C3d59r%3DzV_5159hwRkZsFRjiGzU6Vq7mknjEfUg%40mail.gmail.com.

