You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
We are using OpenIdConnect and we need to customize the redirect behavior. In our scenario, the redirect is a reaction to AJAX request and instead of returning HTTP 302, we need to return HTTP 401 with the Location header specifying the target URL.
The redirectContext.ProtocolMessage.State is not set by that time, so when we call ProtocolMessage.CreateAuthenticationRequestUrl(), we get an invalid login URL - it displays the login page, but when we get back, we get the error that the message.State is empty string or null.
I can make the change and send the PR, but I'd like to discuss the way how to do it. I don't like the OpenIdConnectRedirectBehavior enum because it kills the extensibility. But since it is there and removing it would be a breaking change, we could do this:
Add a new member Custom in the OpenIdConnectRedirectBehavior enum.
Add an extensibility point in the OpenIdConnectEvents - something like this: