I send a header in a recommended form Authorization: Bearer <token>
.
As it looks, token string, which is 'Bearer <token>'
, is not a token, but needs the 'Bearer '
substring to be removed first to get the token string itself.
I wonder, if it's a regular practice to remove it manually from code, like this:
const token = authHeaderValue.replace('Bearer ', '')
before decoding and verifying it?
Why do I need this 'Bearer '
string in my custom application?