use authServerUrl when defined (#29746)

fixes: #29641

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2024-05-28 09:45:03 +02:00 committed by GitHub
parent 97cc973af0
commit 3abb09bf59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,7 +49,10 @@ export const KeycloakProvider = <T extends BaseEnvironment>({
const [error, setError] = useState<unknown>();
const keycloak = useMemo(() => {
const keycloak = new Keycloak({
url: environment.authUrl,
url:
"authServerUrl" in environment
? (environment.authServerUrl as string)
: environment.authUrl,
realm: environment.realm,
clientId: environment.clientId,
});