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

Can we do User impersonation? #203

Open
jpnathan21 opened this issue Feb 1, 2023 · 0 comments
Open

Can we do User impersonation? #203

jpnathan21 opened this issue Feb 1, 2023 · 0 comments

Comments

@jpnathan21
Copy link

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>
@jpnathan21 jpnathan21 changed the title Can we do User impersonation Can we do User impersonation? Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant