I'm not sure if I'm doing this correctly, but the way I have my server set up now is the user send a POST request to /api/login with their username and password. If it's correct, the server send back a JsonWebToken and the client stores it in localStorage by doing localStorage.setItem('auth', token)
Now my question is how do I get the client to send that token to the server every time they go to a new page on the site?
Eg say in the HTML I have
<a href = '/home'>Home</a>
How do I sent the token when they click that link so the server can validate the user and load the appropriate HTML? I'm using NodeJS and Express