OpenId 身份验证跳过 "Please wait..." 屏幕

OpenId authentication skip "Please wait..." screen

在将用户重定向到最终页面之前,我有一个以 OpenID 身份验证作为中间层的 .net 核心应用程序。

这是 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
                }
            };

这里的问题是在用户登录并提交密码后,将用户重定向到带有"Please wait..."消息的openId页面,然后重定向到最终产品页面。

我的问题是:有没有办法以编程方式删除到该中间屏幕的重定向?

原来你不能跳过屏幕,但你可以通过在主项目中添加模板文件夹来编辑模板,并添加 _authorizeresponse.html 包含以下内容的文件:

<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>