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.