![](/img/trans.png)
[英]IdentityServer4 as external provider, how to avoid logout prompt?
[英]How to logout from IdentityServer4-client from External IdentityServer4 using FrontChannelLogout
我有一個IdentityServer4 身份服務器客戶端作為外部IdentityServer4 身份服務器主機 的客戶端,當我在identity-server-master上注銷時,從Identity-server-client注銷時存在一些問題。 我已指定SignedOutCallBackPath和RemoteSignedOutPath在AddOpenIdConnect在身份服務器-客戶端 身份的服務器主機 。 我還為客戶端指定了FrontChannelLogoutUri和PostLogoutRedirectUri 。
我遵循了Identity Server 4中的此示例。
身份服務器客戶端中的配置
.AddOpenIdConnect("demoidsrv", "IdentityServer", options =>
{
options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
options.SignOutScheme = IdentityServerConstants.SignoutScheme;
options.Authority = "https://demo.identityserver.io/";
options.ClientId = "implicit";
options.ResponseType = "id_token";
options.SaveTokens = true;
options.CallbackPath = "/signin-idsrv";
options.SignedOutCallbackPath = "/signout-callback-idsrv";
options.RemoteSignOutPath = "/signout-idsrv";
options.TokenValidationParameters = new TokenValidationParameters
{
NameClaimType = "name",
RoleClaimType = "role"
};
})
...以及他們的演示實例中的Identity-server-master中的配置
new Client
{
ClientId = "implicit",
ClientName = "Implicit Client",
AllowAccessTokensViaBrowser = true,
RedirectUris = { "https://notused" },
PostLogoutRedirectUris = { "https://notused" },
FrontChannelLogoutUri = "http://localhost:5000/signout-idsrv", // for testing identityserver on localhost
AllowedGrantTypes = GrantTypes.Implicit,
AllowedScopes = { "openid", "profile", "email", "api" },
},
問題在於,當嘗試退出前通道時,找不到路徑。 我無能為力...
通過添加終結點來解決此問題,該終結點基本上終止了正在進行的會話。 我不知道這是否是最佳解決方案,因為我了解到可以在IdentityServer4的注銷頁面上將前通道注銷與iframe一起使用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.