My application is basically this one: https://github.com/IdentityServer/IdentityServer4.Quickstart.UI
But I'm trying to map it to "/identity" using this piece of code:
app.Map("/identity", builder => { builder.UseIdentityServer(); });
It's working well, I can access /identity/.well-known/openid-configuration
successfully.
However, if I try to connect, the application redirects me to /identity/account/login
, which is on the IdentityServer side. IdentityServer cannot find my controller, so it returns me 404.
I tried to the LoginUrl property:
services.AddIdentityServer(options =>
{
options.UserInteraction.LoginUrl = "/bleh/account/login";
})
But it also returns 404.
I also tried to make the Quickstart controller route the same as the redirect one:
[Route("identity/account/login")]
But it also returns 404.
Any idea?
If anyone is still looking for this. This worked for me:
app.Map("/identity", builder => {
builder.UseStaticFiles();
builder.UseIdentityServer();
builder.UseMvcWithDefaultRoute();
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With