Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

171
Views
Keycloak Instance not created using keycloak-js

Keycloak (14.0) is configured for React+Typescript application and use of PKCE.
This set-up worked well when POC was carried out two months back.
But, now it's not working even with Keycloak 16.1.1 version.
'keycloak-js' version always kept in sync with server version.

const keycloakConfig = {
    url: 'http://127.0.0.1:8080/auth',
    realm: 'my-realm',
    clientId: 'my-react-app'
}

const keycloak = Keycloak(keycloakConfig);
console.log('keycloak ==>' + JSON.stringify(keycloak));

Above code now logs output as: keycloak ==>{}
Already spent a full day to solve the issue which might be small but unable to do so.
Any pointers to overcome the issue are appreciated.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I have solved in my project react-typescript with this

    import Keycloak, { KeycloakConfig } from "keycloak-js";

    const initOptions: KeycloakConfig = {
        url: "https://myurl/auth",
        realm: "myrealm",
        clientId: "myclient",
    };

    const keycloak = new Keycloak(initOptions);

    export default keycloak;

and later to wrap all in ReactKeycloakProvide

      <React.StrictMode>
            <ReactKeycloakProvider authClient={keycloak}>
                <App />
            </ReactKeycloakProvider>
        </React.StrictMode>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!