Join Angular Projects

0

I created several angular projects simulating the faces of a system, eg: stock project, financial project, etc. And now I came up with a question, I was going to do a single login system that would check who the user is and direct him to the project he has access to. Would you like to know there is a proper way to do it? I thought about creating a new project, doing a login check and then creating components, and copying and pasting of previous projects.

    
asked by anonymous 10.05.2018 / 17:06

1 answer

0

The best way to do this is to work with JWT authentication. This authentication would not use the recorded sessions and thus could be interoperable between applications:

  • The login app validates the user and generates the authentication JWT with an expiration time, for security.
  • Based on the user access rule, the login app would redirect to the industry app.
  • The industry app, which is independent, would receive this JWT and validate it, being valid, would use this JWT as the key for all requests to the backend / API
  • 01.11.2018 / 15:07