I have several client applications I want to put under Identity Server Authentication for which I'm using Duende IdentityServer. So, my Identity Server Project consists of the following.
- Code blocks to configure the Identity Server
- An ASP.NET MVC UI for Login, Error etc.
I want to keep the Identity Server and the Login application in separate projects. Here's what I'm trying to implement.
- Identity Server Project : To have the Code blocks to check for the token and validate if it's a valid token.
- If the token is invalid redirect to the Login Page in Login Application.
- After a valid user log in success come back to the Identity Server, generate the token and maintain the token same as how the usual Identity Server works.
- And with every request response the token will be validated by the Identity Server.
But I'm not sure whether it's possible or how to implement it. Is there a way to separate the Identity Server and the Login Application in separate projects?
We are also evaluating the feasibility of having separate applications for UIs and for the rest of IdentityServer. Unfortunately, our conclusion so far is that IdentityServer doesn't support this scenario naturally. For example, the existence of IIdentityServerInteractionService suggests that interaction is designed to be used within the same application via dependency injection and a diagram on the documentation also suggest there is a single application - see link below. I wouldn't say it unfeasible but we found few resources backing or supporting this scenario. Let us know if you find gold...
https://identityserver4.readthedocs.io/en/latest/topics/signin.html#login-workflow