I have a .net core application with OpenID authentication as middle layer before redirecting the user to final page.
This is part of the code in Startup.cs:
var factory = new IdentityServerServiceFactory();
factory.UseInMemoryClients(Clients.Get())
.UseInMemoryScopes(Scopes.Get())
.UseInMemoryUsers(Users.Get())
.CorsPolicyService = new Registration<ICorsPolicyService>(new InMemoryCorsPolicyService(Clients.Get()));
var identityServerOptions = new IdentityServerOptions
{
SiteName = "Site name",
SigningCertificate = Certificate.Get(),
Factory = factory,
AuthenticationOptions = new IdentityServer3.Core.Configuration.AuthenticationOptions
{
IdentityProviders = ConfigureWsFed,
EnableSignOutPrompt = false,
EnablePostSignOutAutoRedirect = true,
PostSignOutAutoRedirectDelay = 0
},
LoggingOptions = new LoggingOptions()
{
EnableHttpLogging = true,
EnableKatanaLogging = true,
EnableWebApiDiagnostics = true,
WebApiDiagnosticsIsVerbose = true
}
};
The issue here is that after the user logins and the password is submitted, it redirects the user to the openId page with "Please wait..." message and then redirects to final product page.
My question is: is there a way to programatically remove the redirection to that intermediate screen?
Turns out you can't skip screen but you can edit template by adding templates folder inside of the main project and add _authorizeresponse.html file with content:
<div class="page-header">
<h1>Please wait...</h1>
</div>
<div class="row">
<div class="col-md-6 col-sm-6">
<form method="post" action="{responseUri}">
{responseFields}
</form>
</div>
</div>