Should jwt cookie have "bearer" ?

I am trying to learn about authentication and authorization (and a lot of other topics together aswell, as it covers everything about routing, dynamic path, etc). A thing I want to know is, should I put Bearer in the cookie? Why do we use Bearer by the way? (I am just following some tutorials and they don't explain whyy)
No description
10 Replies
Pi, a future fluent jp speaker
what is the difference between sending the token in headers and in cookies btw could someone explain? When the cookies are created, isn't it setted in the headers?
ἔρως
ἔρως15mo ago
any authorization tokens should not go in the cookies that kind of information belongs in the header it was meant for in this case, authorization the server will read that header and decide from there, or just ignore it
Pi, a future fluent jp speaker
why do we use "bearer" in token headers?
ἔρως
ἔρως15mo ago
it's because there's multiple authorization methods one of them is basic, which sends an username and password the beared type is for a token
Pi, a future fluent jp speaker
And authentication tokens?
ἔρως
ἔρως15mo ago
that depends on the api
Pi, a future fluent jp speaker
like to see if the user is authenticated or not
ἔρως
ἔρως15mo ago
that depends on the api
Pi, a future fluent jp speaker
Give me an example
ἔρως
ἔρως15mo ago
for example, some may require a specific header or an api key
Want results from more Discord servers?
Add your server