Skip to content

Commit 77d8288

Browse files
authored
Merge pull request #11 from elixir-europe/dev
Dev
2 parents 9163877 + 0a5646f commit 77d8288

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ import { AuthProvider } from "react-oidc-context";
1313
window.CONFIG = cfg;
1414
globalThis.CONFIG = cfg;
1515

16+
window.OIDCCfg = OIDCCfg;
17+
globalThis.OIDCCfg = OIDCCfg;
18+
1619
console.log(process.env)
1720

1821
console.log(OIDCCfg)

src/pages/Login.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,15 @@ export default function Login() {
2727
const LOGOS = UI.logos ?? {};
2828
const loginRequired = Boolean(CFG.loginRequired);
2929

30-
const isProd = window.location.hostname === `${process.env.BEACON_UI_PUBLIC_URL}`;
30+
const isProd = window.location.hostname === `${CONFIG.appUrl}`;
31+
console.log("is prod: " , isProd);
32+
3133
const REDIRECT_URI = isProd
32-
? `${process.env.BEACON_UI_OIDC_ENDPOINT}/login`
34+
? `${CONFIG.appUrl}/login`
3335
: "http://localhost:3000/login";
3436

37+
console.log("REDIRECT_URI: ", REDIRECT_URI);
38+
3539
const from = location.state?.from?.pathname || "/";
3640
const hasCallback = sp.has("code") || sp.has("error");
3741
const err = sp.get("error");

0 commit comments

Comments
 (0)