# Authentication & Auth - 17-Auth

**URL:** <https://forum.codewithmosh.com/t/authentication-auth-17-auth/1288>\
**Category:** React\
**Created:** [December 15, 2020, 1:02pm UTC](https://forum.codewithmosh.com/t/authentication-auth-17-auth/1288 "2020-12-15T13:02:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MinaAbdelmalek](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@MinaAbdelmalek](https://forum.codewithmosh.com/u/MinaAbdelmalek)\
**Post date:** [December 15, 2020, 1:02pm UTC](https://forum.codewithmosh.com/t/authentication-auth-17-auth/1288/1 "2020-12-15T13:02:36Z")

</div>

I’m getting an error 400 when I try to delete a Movie or Edit, despite that I’m logged in and admin as per the JWT decoded token, showing isAdmin = true, I even logged it on the console to avoid doubt.  
17- Auth - [2.22] showing that error in the backend “Invalid Token” which means it failed to decode the token.  
“requiresAuth”: true (in default.json)  
Update: I tried to change it to false and didn’t get an invalid token, hence, it’s an issue with enabling the authentication using isAdmin = true  
Resolved! not sure why setJwt(getJwt()) was not functional in authService, I changed this line to http.setJwt(localStorage.getItem(tokenKey));

---

<div class="post-metadata">

**Author:** ![ThangTruong](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/thangtruong/32/3223_2.png) [@ThangTruong](https://forum.codewithmosh.com/u/ThangTruong)\
**Post date:** [February 7, 2022, 4:58am UTC](https://forum.codewithmosh.com/t/authentication-auth-17-auth/1288/2 "2022-02-07T04:58:29Z")

</div>

Hi Mina,

I am learning the course as well and getting stuck at the sections as Calling Backend Services and Authentication&Authorization. At the folder- vidly-api-noe: I could not start connection to services as required install corrected libraries. If you don’t mind please support me.

 ![error-save-movie-axios-put-2](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/8/8bd2d5e1ccf32e7c11b266d47899d23e7dba44ec.png)

Thanks for your time.

Regards,  
Thang
