keycloak-scim/src/context/auth/keycloak.ts

10 lines
336 B
TypeScript
Raw Normal View History

import Keycloak, { KeycloakInstance } from "keycloak-js";
const keycloak: KeycloakInstance = Keycloak("/keycloak.json");
export default async function (): Promise<KeycloakInstance> {
await keycloak.init({ onLoad: "check-sso", pkceMethod: "S256" }).catch(() => {
alert("failed to initialize keycloak");
2020-08-06 08:51:35 +00:00
});
return keycloak;
}