On a .Net When i create a Open ID connect Authentication Options I have a property to set the RedirectUri this is even defined as recommended on the documentation but no such property exists on the AspNetCore it is automatically set to the current server EX:(http://localhost)
, is there a way to change this?
Trying to find a solution for this I came across of lots of shortcomings of the new AspNetCore Authentication is this production ready or just WIP?
After fiddling around with this I found out that you have to set an event listener for the OnRedirectToIdentityProvider
event.
services.AddOpenIdConnect(options =>
{
Configuration.Bind("<Json Config Filter>", options);
options.Events.OnRedirectToIdentityProvider = async context =>
{
context.ProtocolMessage.RedirectUri = "<Return URI String>";
await Task.FromResult(0);
};
});
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