Stop using Keycloak config endpoint for Admin Client (#3669)
This reverts commit 6a75c6da6b
.
This commit is contained in:
parent
cec8e5f547
commit
db1ea6b70c
1 changed files with 6 additions and 13 deletions
|
@ -71,21 +71,14 @@ export function useFetch<T>(
|
||||||
}, deps);
|
}, deps);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getKeycloakConfig() {
|
export async function initAdminClient() {
|
||||||
if (environment.isRunningAsTheme) {
|
const keycloak = new Keycloak({
|
||||||
return environment.consoleBaseUrl + "config";
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
url: environment.authServerUrl,
|
url: environment.authServerUrl,
|
||||||
realm: environment.loginRealm,
|
realm: environment.loginRealm,
|
||||||
clientId: "security-admin-console-v2",
|
clientId: environment.isRunningAsTheme
|
||||||
};
|
? "security-admin-console"
|
||||||
}
|
: "security-admin-console-v2",
|
||||||
|
});
|
||||||
export async function initAdminClient() {
|
|
||||||
const config = getKeycloakConfig();
|
|
||||||
const keycloak = new Keycloak(config);
|
|
||||||
|
|
||||||
await keycloak.init({ onLoad: "check-sso", pkceMethod: "S256" });
|
await keycloak.init({ onLoad: "check-sso", pkceMethod: "S256" });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue