Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/261.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 打开Id注销重定向_C#_Asp.net_Oauth 2.0_Identityserver4_Openid - Fatal编程技术网

C# 打开Id注销重定向

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

为什么signoutRedirect不起作用

我的配置客户端

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,但查询字符串为空