I'm making a full stack web application. My frontend consists of angular-cli and my backend is built from node + express.
I managed to get authentication (read: register and login) working by using a JWT token. At this moment this token is stored in localStorage. This makes it possible that users can share their token, or the token can be stolen by malicious users.
I use the token to prevent/allow users to follow certain routes in my frontend and also to authorise certain api calls.
Is there a way this JWT token can be made more secure or should I follow a different route for authentication/authorisation?
Thanks in advance.