I have three applications:
1. Login (running on port 8080) with very simple jQuery
2. API (running on port 4000) with Nodejs
3. Web (which runs on port 4200) with Angular
When I log in and click "Log In", it will call the API, validate if the user exists, if success will return a token from JWT. When I return this token, I need to set it to localStorage, then redirect to the web application.
The problem with this is that they are different ports, so if I get to the localStorage of the login application and then redirect to the web application, the token will no longer exist in the localStorage.
How can I solve this problem?