Azure B2C 注销登录时遇到问题(!)

Azure B2C Log out has trouble signing me IN(!)

我的 Blazor 服务器端应用程序使用 Azure B2C 身份验证。目前,我 运行 它在本地。登录工作正常,但是当我按 退出 时,我得到

Sorry, but we're having trouble signing you in.

...

The id_token_hint parameter has not been specified in the request. Please provide token and try again.

在我的 Azure 应用程序注册中,我将前端通道注销 URL 设置为

https://localhost:44333/

怎么了?

您必须启用“注销时需要 id 令牌提示”,它可以保护 post_logout_redirect_uri。

在这种情况下,您必须将查询参数作为注销调用的一部分传递给 AAD B2C,如下所示 &id_token_hint=<id_token>

这与前台通道注销无关url。当您登录到 2 个应用程序时调用,从 app1 注销,将调用 app2 的前端通道注销 url 进行单次注销。