authts / react-oidc-context

Lightweight auth library based on oidc-client-ts for React single page applications (SPA). Support for hooks and higher-order components (HOC).
MIT License
624 stars 61 forks source link

KeyCloak Authentication not working #1019

Open jagadeesh93 opened 8 months ago

jagadeesh93 commented 8 months ago

Hii, I was using react-keycloak for my project , since its unmaintained i am trying to migrate it to react-oidc-context I am following the documentation in the repo but unfortunately its not making any request to my Keycloak server for login This is my configuration

const oidcConfig: AuthProviderProps = {
  authority: "https://keycloak.com/auth/realms/my_realm",
  client_id: "my_keycloak_client",
  redirect_uri: "http://localhost:3000"
};
ReactDOM.render(
  <AuthProvider
    {...oidcConfig}
  >
    <Test />
  </AuthProvider>,
  document.getElementById("root") as HTMLElement
);

This app was working perfectly fine in the old libriary. In the DOM I can see an iframe and in the network tab i can see the requests they made to fetch the tokens etc.. But in this library nothing is there Please help @pamapa

pamapa commented 8 months ago
zach-betz-hln commented 3 months ago

In case it's helpful: https://github.com/authts/react-oidc-context/issues/1208