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 (I'll eat who dont correct me
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?
ἔρως
ἔρως9mo 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 (I'll eat who dont correct me
why do we use "bearer" in token headers?
ἔρως
ἔρως9mo 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 (I'll eat who dont correct me
And authentication tokens?
ἔρως
ἔρως9mo ago
that depends on the api
Pi (I'll eat who dont correct me
like to see if the user is authenticated or not
ἔρως
ἔρως9mo ago
that depends on the api
Pi (I'll eat who dont correct me
Give me an example
ἔρως
ἔρως9mo ago
for example, some may require a specific header or an api key