微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

打开 ID 注销重定向

如何解决打开 ID 注销重定向

为什么 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,}
            };

Redirect picture

使用 signinRedirect 一切正常,但使用 signOut 存在一些问题。我需要 logoutId 但查询字符串为空,

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。