Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't exactly logout #1041

Open
durmazoguzhan opened this issue Nov 30, 2023 · 1 comment
Open

I can't exactly logout #1041

durmazoguzhan opened this issue Nov 30, 2023 · 1 comment

Comments

@durmazoguzhan
Copy link

durmazoguzhan commented Nov 30, 2023

  • I want to logout and login as another user. I can login, logout, but i login automatically(without open id login page) and i can't enter another user credentials.
  • I see open id login page when app open just first time.
const oidcConfig = {
  authority: 'https://localhost:44365',
  clientId: 'inveshop',
  clientSecret: 'secret',
  redirectUri: 'http://localhost:3000/signin-oidc',
  postLogoutRedirectUri: 'http://localhost:3000/signout-callback-oidc',
  responseType: 'code',
  scope: 'inveshop openid',
  loadUserInfo: true,
  autoSignIn: false
};
<AuthProvider
  {...oidcConfig}
  onSignIn={(user) => {
    dispatch({ type: "user/login", payload: user.profile });
  }}
  onSignOut={() => {
    dispatch({ type: "user/logout" });
  }}
>
<button onClick={() => auth.signOut()}>
  <i className="fa fa-sign-out"></i> Çıkış Yap
</button>
<button onClick={() => auth.signIn()}>
  <i className="fa fa-user"></i>
  Giriş Yap
</button>
@durmazoguzhan
Copy link
Author

How to close session when run the auth.signIn() function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant