yeah i figured out the problem bro thank you very @Nitin Kalmaste much giving your previous time.
On Sat, Dec 12, 2020 at 8:00 AM narendra thapa <narendrathapa...@gmail.com> wrote: > Nothing works for me tried everything, always throws a forbidden. Djoser > documentation says support upto Djnago-restframework V11 but i have got > V12. Is that a problem or what. I am not able to figure it out. > > On Fri, Dec 11, 2020 at 11:17 PM Nitin Kalmaste <nknckalma...@gmail.com> > wrote: > >> There is space between jwt and token i.e. Authorization: jwt <token> >> >> On Fri, 11 Dec 2020, 9:03 pm narendra thapa, <narendrathapa...@gmail.com> >> wrote: >> >>> i have used postman also to check the endpoint but same problem. I think >>> problem is in django backend not in react. >>> >>> On Fri, Dec 11, 2020 at 9:14 PM narendra thapa < >>> narendrathapa...@gmail.com> wrote: >>> >>>> const config1 = { >>>> headers:{ >>>> 'Content-Type':'application/json', >>>> 'Authorization':`JWT ${res.data?.access}`, >>>> 'Accept':'application/json' >>>> } >>>> } >>>> console.log('hello',config1) >>>> try{ >>>> const res1 = axios.get(`http://localhost:8000/auth/users/me/` >>>> <http://localhost:8000/auth/users/me/>,config1).then( >>>> response => response >>>> ) >>>> console.log(res1); >>>> }catch(err){ >>>> console.log(err) >>>> } >>>> >>>> On Fri, Dec 11, 2020 at 8:47 PM Nitin Kalmaste <nknckalma...@gmail.com> >>>> wrote: >>>> >>>>> Can You send me json request details, how you are sending data to >>>>> server >>>>> using react >>>>> >>>>> On Fri, Dec 11, 2020 at 8:21 PM narendra thapa < >>>>> narendrathapa...@gmail.com> wrote: >>>>> >>>>>> I have followed the documentation. and done all the thing that i >>>>>> could do. i am getting access token but not able to authorize >>>>>> here is my code in stackoverflow please check it once. I have >>>>>> followed a tutorial for the same in that he is able to access but i got >>>>>> stuck. >>>>>> for frontend i'm using the React js >>>>>> >>>>>> >>>>>> https://stackoverflow.com/questions/65253481/djoser-simplejwt-authorization-forbidden403-whie-sending-jwt-token-to-auth-u >>>>>> >>>>>> On Fri, Dec 11, 2020 at 8:26 PM Nitin Kalmaste < >>>>>> nknckalma...@gmail.com> wrote: >>>>>> >>>>>>> Getting started — djoser 2.0.1 documentation >>>>>>> <https://djoser.readthedocs.io/en/latest/getting_started.html> -- >>>>>>> Use this as a reference and start your project >>>>>>> >>>>>>> >>>>>>> On Fri, Dec 11, 2020 at 8:09 PM Nitin Kalmaste < >>>>>>> nknckalma...@gmail.com> wrote: >>>>>>> >>>>>>>> Have you followed the official documentation? i dont't see that you >>>>>>>> have used any settings >>>>>>>> >>>>>>>> On Fri, Dec 11, 2020 at 7:10 PM narendra thapa < >>>>>>>> narendrathapa...@gmail.com> wrote: >>>>>>>> >>>>>>>>> here is the project >>>>>>>>> >>>>>>>>> On Fri, Dec 11, 2020 at 5:02 PM Nitin Kalmaste < >>>>>>>>> nknckalma...@gmail.com> wrote: >>>>>>>>> >>>>>>>>>> Can you share some of your code so we can figure it out? As early >>>>>>>>>> as possible >>>>>>>>>> >>>>>>>>>> On Fri, 11 Dec 2020, 3:18 pm narendra thapa, < >>>>>>>>>> narendrathapa...@gmail.com> wrote: >>>>>>>>>> >>>>>>>>>>> I am using JWT <token>. I can get the access and refresh token >>>>>>>>>>> and while i resent the access token Authorization : JWT >>>>>>>>>>> <access_token> it >>>>>>>>>>> send 403 forbidden. I am using DJOSER and simple JWT for >>>>>>>>>>> authentication and >>>>>>>>>>> authorization. >>>>>>>>>>> >>>>>>>>>>> On Fri, Dec 11, 2020 at 1:45 PM Nitin Kalmaste < >>>>>>>>>>> nknckalma...@gmail.com> wrote: >>>>>>>>>>> >>>>>>>>>>>> Check weather sending token in a proper way ither in terms of >>>>>>>>>>>> authorization or as a bearer token. It depends on what backend >>>>>>>>>>>> you are >>>>>>>>>>>> using. >>>>>>>>>>>> >>>>>>>>>>>> On Fri, 11 Dec 2020, 12:19 pm narendra...@gmail.com, < >>>>>>>>>>>> narendrathapa...@gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Do we need to do WSGIAUTHORIZATION ON in order to authorize a >>>>>>>>>>>>> jwt token. >>>>>>>>>>>>> I am getting "detail": "Authentication credentials were not >>>>>>>>>>>>> provided." while sending a authorizationtoken and 403 forbidden. >>>>>>>>>>>>> can >>>>>>>>>>>>> somebodyhelp me out. >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> 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 django-users+unsubscr...@googlegroups.com >>>>>>>>>>>>> . >>>>>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>>>> https://groups.google.com/d/msgid/django-users/fd2b35cd-2866-4f6b-a28a-46e25b0f19afn%40googlegroups.com >>>>>>>>>>>>> <https://groups.google.com/d/msgid/django-users/fd2b35cd-2866-4f6b-a28a-46e25b0f19afn%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 django-users+unsubscr...@googlegroups.com. >>>>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>>> https://groups.google.com/d/msgid/django-users/CAKroR%2B0%2BuHQbOEr7AsXuu5aNWTDL-shPSE8Cah0cfVVoGQ_eiA%40mail.gmail.com >>>>>>>>>>>> <https://groups.google.com/d/msgid/django-users/CAKroR%2B0%2BuHQbOEr7AsXuu5aNWTDL-shPSE8Cah0cfVVoGQ_eiA%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 django-users+unsubscr...@googlegroups.com. >>>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>> https://groups.google.com/d/msgid/django-users/CAEtntjXu3viY3sRDuFO__fGXdo8rt0D7YyY0VPVF03mcOYMnPA%40mail.gmail.com >>>>>>>>>>> <https://groups.google.com/d/msgid/django-users/CAEtntjXu3viY3sRDuFO__fGXdo8rt0D7YyY0VPVF03mcOYMnPA%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 django-users+unsubscr...@googlegroups.com. >>>>>>>>>> To view this discussion on the web visit >>>>>>>>>> https://groups.google.com/d/msgid/django-users/CAKroR%2B2B8MDxg9yJYb2AV_TZ34cgGYcd2rRYd_E1cs9sH7Vw2g%40mail.gmail.com >>>>>>>>>> <https://groups.google.com/d/msgid/django-users/CAKroR%2B2B8MDxg9yJYb2AV_TZ34cgGYcd2rRYd_E1cs9sH7Vw2g%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 django-users+unsubscr...@googlegroups.com. >>>>>>>>> To view this discussion on the web visit >>>>>>>>> https://groups.google.com/d/msgid/django-users/CAEtntjUPLWkqoEb06DOii0xzufFdVJg%2BJ_MiYZZQqtmoz%3DcsOA%40mail.gmail.com >>>>>>>>> <https://groups.google.com/d/msgid/django-users/CAEtntjUPLWkqoEb06DOii0xzufFdVJg%2BJ_MiYZZQqtmoz%3DcsOA%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 django-users+unsubscr...@googlegroups.com. >>>>>>> To view this discussion on the web visit >>>>>>> https://groups.google.com/d/msgid/django-users/CAKroR%2B3PZtnAGq%3DfRiHXmYQ6FHoGFcXuJfCsyhHtPyUE%2BtcGxQ%40mail.gmail.com >>>>>>> <https://groups.google.com/d/msgid/django-users/CAKroR%2B3PZtnAGq%3DfRiHXmYQ6FHoGFcXuJfCsyhHtPyUE%2BtcGxQ%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 django-users+unsubscr...@googlegroups.com. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/django-users/CAEtntjXe0Nm9MZgorFkx-3c3wzyh9DkU4UjgTj5dLcfb4Q3CTw%40mail.gmail.com >>>>>> <https://groups.google.com/d/msgid/django-users/CAEtntjXe0Nm9MZgorFkx-3c3wzyh9DkU4UjgTj5dLcfb4Q3CTw%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 django-users+unsubscr...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/django-users/CAKroR%2B0rbPKJpTDc%3DfUJ28GnLiDDq8DprUvNkFCcfn4OA-MkCA%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/django-users/CAKroR%2B0rbPKJpTDc%3DfUJ28GnLiDDq8DprUvNkFCcfn4OA-MkCA%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 django-users+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CAEtntjV5KVsUY8NHEswsKbo25x3637b%2BmxO%2BW6f%3DExgVFJo%2B%3DA%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CAEtntjV5KVsUY8NHEswsKbo25x3637b%2BmxO%2BW6f%3DExgVFJo%2B%3DA%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 django-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAKroR%2B24%3DOojX-bYMYb3fc99Cs1eTTJpZC6By0FGzJoDMmYvKQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAKroR%2B24%3DOojX-bYMYb3fc99Cs1eTTJpZC6By0FGzJoDMmYvKQ%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 django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEtntjWAMVnKCQsbUTa4%3DHAWfjWYKrV8EMhC6xkrp7Er1c78DA%40mail.gmail.com.