I am using Identity Server 3 + OpenID Connect + OAuth 2.0 to implement Single Sign On in one of my projects. I have set up everything according to samples provided and everything works just fine. I am using Implicit flow to authenticate user in multiple MVC websites.
Now I have a use case when I need to pass custom parameters from client application to identity server. One of the simplest examples would be custom message that needs to be shown in one of Identity Server views. I would like to render this message in different pages - login, logout, logged out, etc.
I found that OpenIdConnectAuthentication middleware from Microsoft allows to set custom parameters in ProtocolMessage in RedirectToIdentityProvider notification.
For example,
RedirectToIdentityProvider = async ctx =>
{
ctx.ProtocolMessage.Parameters.Add("info_message", "Account activation succeeded. Please log in using new account.");
}
}
Unfortunately, I was not able to find where those parameters can be read in Identity Server. Is this even possible?
If this is not supported or just plain wrong, could you please advise what would be the best way to handle this use case?
acr_values
cover cases when I want to display something in login view. What about cases when I need to pass something to logout/logged out screens? Something like "Your session has expired. Please try to log in again". – Staggard