+
Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Can we do User impersonation? #203

@jpnathan21

Description

@jpnathan21

Describe the bug
I am an admin user in my react application. I wanted to impersonate my user's dashboard and support my users. is there any way we can pass the access token inside ReactKeycloakProvider and silent login into the user dashboard?

This is the code available in my root.ts file

<ReactKeycloakProvider
      authClient={keycloak}
      onTokens={({ token }) => {
        axios.defaults.headers.common.Authorization = `Bearer ${token}`;
        localStorage.setItem('kcToken', token || '');
      }}
      initOptions={initOptions}
      onEvent={handleOnEvent}
    >
      <ThemeProvider>
        <CssBaseline />
        <AppRoutes />
      </ThemeProvider>
    </ReactKeycloakProvider>

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载