Allow login realm to be set during development (#3729)

This commit is contained in:
Jon Koops 2022-11-07 16:33:01 -05:00 committed by GitHub
parent 577261abba
commit 8ffe800272
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,9 +19,12 @@ export type Environment = {
isRunningAsTheme: boolean; isRunningAsTheme: boolean;
}; };
// During development the realm can be passed as a query parameter when redirecting back from Keycloak.
const realm = new URLSearchParams(window.location.search).get("realm");
// The default environment, used during development. // The default environment, used during development.
const defaultEnvironment: Environment = { const defaultEnvironment: Environment = {
loginRealm: "master", loginRealm: realm ?? "master",
authServerUrl: "http://localhost:8180", authServerUrl: "http://localhost:8180",
authUrl: "http://localhost:8180", authUrl: "http://localhost:8180",
consoleBaseUrl: "/admin/master/console/", consoleBaseUrl: "/admin/master/console/",