How to use a JWT Token to get data from an API with Javascript

preview_player
Показать описание
#shorts #javascript #codenewbie #beginners #tutorial #programming #code #jwt #webdev #webdevelopment #tipsandtricks #api #endpoints #security #asyncawait #fetchapi
Рекомендации по теме
Комментарии
Автор

'Content-Type' : 'application/json' is not the type of content what we 'expect' from the server's response.
It is actually telling the server that we're sending the data of type 'json' to it.
Infact, if we want to expect certain type of data response from the server, then we need to use
'Accept' : 'application/json'

jxswxnth
Автор

Just subbed. I’m a year one dev and my boss just gave me a task dealing with jwt for our microservices. I need all the help I can get. Lol

darrienjohnson
Автор

And here, ladies and gentlemen, this is how you get hacked.

SHARPUIQ
Автор

How’s this considered accessing a restricted endpoint if you submit a valid authtoken which you get after a successful authentication?

dontreadthis
Автор

Which plugin are you using for that line from start to end ?

rajeshbasnet
Автор

I am getting 401 error, even if I pass token in the Authorization header

aaminsaan
Автор

Refresh token saves in server side
İt is possible?

fikreteliyev
Автор

You're not accessing a restricted api 😅

yyyd