Skip to content

Commit

Permalink
wait for login to finish (keycloak#35044)
Browse files Browse the repository at this point in the history
fixes: keycloak#34864

Signed-off-by: Erik Jan de Wit <[email protected]>
(cherry picked from commit ced8e64)
  • Loading branch information
edewit committed Nov 19, 2024
1 parent c15bc7c commit 2433175
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/apps/admin-ui/src/admin-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
useRequiredContext,
} from "@keycloak/keycloak-ui-shared";
import type Keycloak from "keycloak-js";

import type { Environment } from "./environment";

export type AdminClientProps = {
Expand All @@ -31,7 +30,7 @@ export async function initAdminClient(
try {
await keycloak.updateToken(5);
} catch {
keycloak.login();
await keycloak.login();
}

return keycloak.token;
Expand Down

0 comments on commit 2433175

Please sign in to comment.