export const Config = { // The OpenID Connect client_id oauth2ClientId: get("oauth2ClientId", "daddy"), oauth2Scope: get("oauth2Scope", "email email_verified openid offline_access"), oauth2RedirectURI: get("oauth2RedirectURI", "http://localhost:8081/oauth2/callback"), oauth2Audience: get("oauth2Audience", ""), oauth2AuthorizeURL: get("oauth2AuthorizeURL", "http://localhost:4444/oauth2/auth"), oauth2TokenURL: get("oauth2TokenURL", "http://localhost:4444/oauth2/token"), oauth2LogoutURL: get("oauth2LogoutURL", "http://localhost:4444/oauth2/sessions/logout"), oauth2PostLogoutRedirectURI: get("oauth2PostLogoutRedirectURI", "http://localhost:8081"), graphQLEndpoint: get("graphQLEndpoint", "http://localhost:8080/api/v1/graphql") }; function get(key: string, defaultValue: T):T { const config = window['__CONFIG__'] || {}; if (config && config.hasOwnProperty(key)) { return config[key] as T; } else { return defaultValue; } }