openiddict / openiddict-core

Flexible and versatile OAuth 2.0/OpenID Connect stack for .NET
https://openiddict.com/
Apache License 2.0
4.43k stars 520 forks source link

Use the current address as the default target link URI when `AuthenticationProperties.RedirectUri` is not set #2169

Closed kevinchalet closed 2 months ago

kevinchalet commented 2 months ago

Confirm you've already contributed to this project or that you sponsor it

Describe the solution you'd like

Unlike most of the OWIN and ASP.NET Core authentication handlers, the OpenIddict client ASP.NET Core and OWIN integrations don't use the current URL as a fallback value when AuthenticationProperties.RedirectUri is not set.

It's not a huge deal with the OWIN integration (since the OpenIddict client OWIN authentication handler deliberately cannot be configured to use AuthenticationMode.Active), but it's a bit more annoying for ASP.NET Core, as the OpenIddict client can be used as the default challenge scheme.

Additional context

No response