Closed ps1Xt closed 3 years ago
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() }
BackEnd side
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, } };
with signinRedirect everything works fine but with signOut there are some problems. I need logoutId but query string is empty,
BackEnd side
with signinRedirect everything works fine but with signOut there are some problems. I need logoutId but query string is empty,