Project 1: MVC application:
So, I have a regular .Net Core MVC application that the user will land when they switch to myDomain.com, which is located on port 3000. Here I use ordinary controllers and razor views, etc. In this application, the user can login, at which point the JWT token will be returned and stored in local storage. They will also be moved to the user portal (hosted on port 3001). This MVC application will also contain API controllers for my user portal.
Project 2: SPA application (user portal):
A user portal is basically a separate SPA client project using a reaction that will be hosted on port 3001, which has its own separate node js server and makes MVC project API calls on port 3000.
So my problem is, how can I save the entry token in these two ports? Is it possible? Does this architecture make sense? Any evidence you can provide on this subject will be greatly appreciated.
source
share