A simpler less stateful replacement for the official keycloak-js adapter. Only supports code authentication flow (since implicit is deprecated).
npm i keycloak-js-simple
import { Keycloak } from 'keycloak-js-simple';
const kc = new Keycloak({
authServerUrl: 'http://localhost:8080',
realm: 'testing',
clientId: 'testing',
};
window.location = kc.getLoginUrl();
See sample-app.