So the documentation has a slight issue when making POST or PUT requests
When making a POST or PUT request, we must input a string with the keyword “Bearer” and then the JSON Web Token, like this:
Though there's a problem, for some unknown reason, when making the POST/PUT request,
Curl adds another double-quote at the end of the Authorization string value, making the token invalid:

So the developer has to remove the last double quote at the end of the JWT, so we end having to input the token like this:
for the POST request to work properly
How to reproduce this error yourself
-
Start the Back-End server and go to the Swagger API doc. with this address: http://localhost:3001/api-docs/#/
-
Go to the User Module → POST - /user/login/ → add the “[email protected]” to the email and “password123” for the password:

-
Click “execute” and copy the JWT without the double quotes:

-
Go to POST - /user/profile/ → Input your JWT like this:
Example:

(NB: I changed the width of the input in CSS to make the entire JWT visible)
- Click the “Execute” button, and you'll see an error message that the token is invalid:
