I am implementing JWT tokens for authentication.
I am not using any client-site framework like Angular or React. It is just EJS.
Step 1. I have an API developed that on successful login returns the token as shown on the picture below(I am using Postman for testing API):
Step 2. I am then accessing the restricted route and passing along the Authorization header with token value, by inputing it manually in the Postman and it works just fine.
My question is WHERE and HOW do I save the returned token from the step 1 on the client, so that it is sent in the header on step 2.
I am novice to web-development and following the tutorials, but all the tutorials I found about implementing the JWT token are written for Angular or React when it comes to the client site.
Any help would be greatly appreciated.
Thank you!