# JWT Authorization Header not Processed

**URL:** <https://forum.codewithmosh.com/t/jwt-authorization-header-not-processed/28416>\
**Category:** Django\
**Created:** [August 28, 2024, 7:29am UTC](https://forum.codewithmosh.com/t/jwt-authorization-header-not-processed/28416 "2024-08-28T07:29:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![keysurfer](https://avatars.discourse-cdn.com/v4/letter/k/898d66/32.png) [@keysurfer](https://forum.codewithmosh.com/u/keysurfer)\
**Post date:** [August 28, 2024, 7:29am UTC](https://forum.codewithmosh.com/t/jwt-authorization-header-not-processed/28416/1 "2024-08-28T07:29:05Z")

</div>

I’m working on the Ultimate Django Series, Part 2. I’m in the Securing APIs section, video 9 - Getting the Current User.

- I have JWT authentication setup
- I have created 3 users (one being the superuser)
- I have set tokens to last 1 day and have tokens for all users
- I have a browser extention to add headers (simple-modify-headers for Firefox) and have tried all 3 users tokens
- When I hit `http://localhost:8000/auth/users/me/` I get 403 Forbidden with the error message “Authentication credentials were not provided.”
- When I hit `http://localhost:8000/app/list` and print headers in this unprotected route in my app, I find my `Authorization: JWT access_token_value` header present

What could be have such that the header is detected in my app, but it is not being processes/detected properly to identify a user?

---

<div class="post-metadata">

**Author:** ![keysurfer](https://avatars.discourse-cdn.com/v4/letter/k/898d66/32.png) [@keysurfer](https://forum.codewithmosh.com/u/keysurfer)\
**Post date:** [August 30, 2024, 8:57pm UTC](https://forum.codewithmosh.com/t/jwt-authorization-header-not-processed/28416/2 "2024-08-30T20:57:51Z")

</div>

Anyone have ideas - this is really frustrating - I can see the header is present when handling my views, but the user is not detected. I just created the token.

---

<div class="post-metadata">

**Author:** ![keysurfer](https://avatars.discourse-cdn.com/v4/letter/k/898d66/32.png) [@keysurfer](https://forum.codewithmosh.com/u/keysurfer)\
**Post date:** [August 30, 2024, 10:20pm UTC](https://forum.codewithmosh.com/t/jwt-authorization-header-not-processed/28416/3 "2024-08-30T22:20:39Z")

</div>

I had an error in my settings file.

---

<div class="post-metadata">

**Author:** ![emcby1](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@emcby1](https://forum.codewithmosh.com/u/emcby1)\
**Post date:** [November 6, 2024, 9:05am UTC](https://forum.codewithmosh.com/t/jwt-authorization-header-not-processed/28416/4 "2024-11-06T09:05:28Z")

</div>

Hello, If you’re using django5, you should know that it’s maybe because of the django and jwt version. Probably in the tutorial you’re watching, mosh is using django3 - you can check it in the mosh codes in the ultimate django course PART 2 resources/code/6-securing apis/finish/storefront2/pipfile.lock

nowadays, the ‘bearer’ request header is very used and that was my problem too. i tried to use jwt as the request header and it didn’t work; while using the bearer request header with the same token worked properly.

wish of luck and god’s love,  
a Mosh Student.
