C# 打开Id注销重定向
为什么signoutRedirect不起作用 我的配置客户端C# 打开Id注销重定向,c#,asp.net,oauth-2.0,identityserver4,openid,C#,Asp.net,Oauth 2.0,Identityserver4,Openid,为什么signoutRedirect不起作用 我的配置客户端 import { UserManager, WebStorageStateStore } from 'oidc-client'; const config = { userStore: new WebStorageStateStore({ store: window.localStorage }), authority: 'http://localhost:65018', client_id: 'xxxxxxxxxxRea
import { UserManager, WebStorageStateStore } from 'oidc-client';
const config = {
userStore: new WebStorageStateStore({ store: window.localStorage }),
authority: 'http://localhost:65018',
client_id: 'xxxxxxxxxxReactId',
response_type: 'code',
redirect_uri: "http://localhost:3000",
scope: 'openid',
post_logout_redirect_uri: "http://localhost:3000/Logout",
};
function App() {
let userManager = new UserManager(config);
const signIn = () => {
userManager.signinRedirect()
}
const logOut = (e : any) => {
userManager.signoutRedirect()
}
后端端
new List<Client>
{
new Client
{
ClientId = "xxxxxxxxxxReactId",
ClientSecrets = {new Secret("xxxxxxxxxxSecret123".ToSha256())},
AllowedGrantTypes = GrantTypes.Code,
AllowedScopes = {"openid", "xxxxxxxxxxApi" },
RedirectUris = { "http://localhost:3000" },
PostLogoutRedirectUris = { "http://localhost:3000/Logout" },
AllowedCorsOrigins = { "http://localhost:3000" },
RequirePkce = true,
RequireClientSecret = false,
AllowAccessTokensViaBrowser = true,
RequireConsent = false,
AccessTokenLifetime = 1,
}
};
新列表
{
新客户
{
ClientId=“XXXXXXXXX反应ID”,
ClientSecrets={newsecret(“xxxxxxxxx secret123.ToSha256())},
AllowedGrantTypes=GrantTypes.Code,
AllowedScopes={“openid”,“XXXXXXXXX API”},
重定向URI={”http://localhost:3000" },
PostLogoutRedirectUris={”http://localhost:3000/Logout" },
AllowedCorsOrigins={”http://localhost:3000" },
RequirePkce=true,
RequireClientSecret=false,
AllowAccessTokensViaBrowser=true,
RequireSent=false,
AccessTokenLifetime=1,
}
};
使用SignInDirect一切正常,但使用signOut存在一些问题。我需要logoutId,但查询字符串为空