wait for login to finish (#35044)

fixes: #34864

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-11-19 08:54:04 +01:00 committed by GitHub
parent 0499c039ec
commit ced8e643c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -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 = {
@ -31,7 +30,7 @@ export async function initAdminClient(
try {
await keycloak.updateToken(5);
} catch {
keycloak.login();
await keycloak.login();
}
return keycloak.token;

View File

@ -103,7 +103,7 @@
</#if>
<script>
// Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1404468
const isFirefox;
const isFirefox = true;
</script>
</head>