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)
10 Replies
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?
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
why do we use "bearer" in token headers?
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
And authentication tokens?
that depends on the api
like to see if the user is authenticated or not
that depends on the api
Give me an example
for example, some may require a specific header or an api key