【发布时间】:2017-09-01 18:15:45
【问题描述】:
我正在使用 IdenetityServer4 并在注销后重定向到 MVC 客户端不起作用。以下是我的 MVC 客户端控制器注销操作:
public async Task Logout()
{
await HttpContext.Authentication.SignOutAsync("Cookies");
await HttpContext.Authentication.SignOutAsync("oidc");
}
以下是身份服务器 4 主机配置文件。
public static IEnumerable<Client> GetClients()
{
return new List<Client>
{
// other clients omitted...
// OpenID Connect implicit flow client (MVC)
new Client
{
ClientId = "mvc",
ClientName = "MVC Client",
AllowedGrantTypes = GrantTypes.Implicit,
// where to redirect to after login
RedirectUris = { "http://localhost:58422/signin-oidc" },
// where to redirect to after logout
PostLogoutRedirectUris = { "http://localhost:58422/signout-callback-oidc" },
AllowedScopes = new List<string>
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile
}
}
};
}
我希望用户在从 IdentityServer 注销后重定向回 MVC 客户端。现在用户必须点击下图中的链接显示重定向回 MVC 站点,但我认为用户应该自动重定向回 MVC 客户端。
【问题讨论】:
-
请分享错误和其他日志。
标签: identityserver4