这是indexloc提供的服务,不要输入任何密码
Skip to content

After log out redirect is not working properly. #1515

@mohamed-isak

Description

@mohamed-isak

### Issue Description
I'm encountering an issue when calling logout() in @axa-fr/react-oidc. After clicking the logout button, I receive the following error

### 📌 Error Message:

Image

### Expected Behavior:
After logging out, the user should be redirected to the login screen (https://localhost:3000), but this is not happening.

### 🛠 Code Implementation

const { logout } = useOidc('default');

  const handleLogout = async () => {
    try {
       logout();
      onConfirm();
    } catch (error) {
      console.error("Logout error:", error);
    }
  }

### OIDC Configuration

export const configurationIdentityServerWithoutServiceWorker = {
  client_id: env.REACT_APP_CLIENT_ID,
  redirect_uri: window.location.origin + '/callback',
  silent_redirect_uri: window.location.origin + '/silent_callback',
  silent_login_uri: window.location.origin + '/silent_callback', 
  scope: IDENTITY_SERVER_SCOPE,
  authority: env.REACT_APP_IDENTITY_SERVER_URL,
  refresh_time_before_tokens_expiration_in_second: 40,
  storage: localStorage,
  //
  preload_user_info: true,
  logLevel: 2,
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions