最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

openid connect - Why does RedirectGet work in place of FormPost for OpenIdConnectRedirectBehavior when redirecting to IdentitySe

programmeradmin3浏览0评论

I have a Blazor server app that uses IdentityServer4 for authentication. For context, all of the following is occurring on developer machines running the app through the Visual Studio 2022 debugger. We are using IISExpress to serve up our apps in the dev environment.

The user navigates to a landing page on the Blazor server app and then clicks a "Sign In" button. This button is supposed to redirect the user to the IdentityServer4 app sign in page where the user then completes the process by providing a username and password for IdentityServer to authenticate. The user would then be redirected back to the Blazor server app upon successful authentication.

This process seems to work fine on Windows 10, but does NOT work on Windows 11. On the Windows 11 machine, when the user clicks the "Sign In" button on the Blazor Server app, the redirect loads a blank page on our Blazor server app ("LoginIdp") and fails with an err_http2_protocol_error and the redirect to the IDP server app never seems to occur.

Through some extensive investigation we found that on the Windows 11 machine, if we launch the browser with http/2 disabled, the problem goes away.

Through further investigation we found that if we change the OpenIdConnectOptions.AuthenticationMethod from OpenIdConnectRedirectBehavior.FormPost to OpenIdConnectRedirectBehavior.RedirectGet the issue also goes away (without having to resort to the flags disabling http/2 in the browser). The question I have is, why is this necessary to change on Windows 11, but not Windows 10.

NOTE: We did test the aforementioned redirect behavior change on a Windows 10 dev machine and it continued working fine.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论