I've asked this here rather than stack overflow as it is more of a concept question, rather than a coding bug/error. I've inherited an old MVC4 project. We want to slowly start to retire it, and switch over to an SPA (written in AngularJS, with a WebAPI backend). The WebAPI backend talks to the exact same database that the MVC4 project does (infact a lot of the business logic was simply copy and pasted to the WebAPI). What I am trying to achieve is:One URL and login screen, user logs in using user name and password.Depending on the User's role, redirect the traffic to the old MVC4 site or the Angular interface. Specifically if the user is one of our clients, direct them to the shiny new Angular interface. If the user is one of our internal staff, keep them on the MVC4 application.I've thought about this at length, about how to implement it. I can see two options:Login via the MVC4 application, and simply have an IF statement in the _Layout.html file to say if the current user's role is a client, render the index.html file for angular, if else then render the normal html body. As the Angular is purely javascript and a Single page application, this in theory should work (unless I'm missing something ridiculously obvious).Login via the Angular application via an AJAX call, if the user is not a client, then obtain the Auth cookie via an AJAX call, and redirect the user to a sub-application within that IIS site (not sure if that's possible or not).Option #1 seems like a hack, however I really am not sure what the best way to implement option #2 would be, or are there any other options available that someone can suggest.Many thanks in advance!
Redirect user to application based on role
.net;angularjs;iis