IdentityServer icon indicating copy to clipboard operation
IdentityServer copied to clipboard

Raise an error if the idp doesn't match the requested idp

Open josephdecock opened this issue 1 year ago • 2 comments

If the client sends a bad/misconfigured/changed idp value, we should give some kind of error rather than redirecting to the login page forever.

Perhaps we should add a virtual method to the interaction response generator so that implementers can customize this more easily.

See https://github.com/DuendeSoftware/Support/issues/1095

josephdecock avatar Feb 09 '24 14:02 josephdecock

IIRC we currently emit a log entry indicating that this is the reason for redirecting back to login.

brockallen avatar Feb 09 '24 15:02 brockallen

Yes, we do have an info log:

Logger.LogInformation("Showing login: Current IdP ({currentIdp}) is not the requested IdP ({idp})", currentIdp, idp);

josephdecock avatar Feb 09 '24 17:02 josephdecock