node.jsthunderclient

During testing time Thunder Client shows fake result for Authorization vs Bearer with same token


I am using Thunder Client for testing jwt token

After login, Token generated successfully,

enter image description here

Headers- Authorization- generated token

I got error message

{
  "message": "Invalid token"
}

enter image description here

But

Auth- Bearer- Bearer Token- generated token

I got successfully message

{
  "message": "I am a private route"
}

enter image description here

So what is the problem with the Authorization vs Bearer token?


Solution

  • Because you are using bearer token when using that we have to set the Bearer keyword in Authorization header like below

    enter image description here

    That what automatically set's while using Auth->Bearer->Token