From 5f712f87f313b88d0659430f23f0b60e4d45a422 Mon Sep 17 00:00:00 2001 From: Timofey Boyko Date: Fri, 28 Jun 2024 18:44:39 +0300 Subject: [PATCH] Add oauth origin for client config --- .../developer-tools/OAuth/sub-components/PreviewDialog.tsx | 2 +- packages/runtime.json | 4 ++-- packages/shared/types/index.ts | 3 +++ public/scripts/config.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/PreviewDialog.tsx b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/PreviewDialog.tsx index 828e7e678f..ab75b213d2 100644 --- a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/PreviewDialog.tsx +++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/PreviewDialog.tsx @@ -190,7 +190,7 @@ const PreviewDialog = ({ const getLink = () => { return `${ - window.location.origin + window?.ClientConfig?.oauth2.origin }/oauth2/authorize?response_type=code&client_id=${client?.clientId}&redirect_uri=${ client?.redirectUris[0] }&scope=${encodingScopes}&state=${state}${ diff --git a/packages/runtime.json b/packages/runtime.json index 8b7a99f2a5..cfdb7d960e 100644 --- a/packages/runtime.json +++ b/packages/runtime.json @@ -1,9 +1,9 @@ { - "date": "2024628_173723", + "date": "2024628_183746", "checksums": { "api.js": "0efbae3383bf6c6b6f26d573eee164d2", "api.poly.js": "2a2ac2c0e4a7007b61d2d1ff7b00a22e", "browserDetector.js": "d9387cce805699498e798230a8639c8a", - "config.json": "1cc6da8a9d43cda405c4f85b0e6039e4" + "config.json": "47a314898c8968fab7565d975e0fb828" } } \ No newline at end of file diff --git a/packages/shared/types/index.ts b/packages/shared/types/index.ts index 4ce016e5a2..ea56f951f2 100644 --- a/packages/shared/types/index.ts +++ b/packages/shared/types/index.ts @@ -112,6 +112,9 @@ declare global { url?: string; }; imageThumbnails?: boolean; + oauth2: { + origin: string; + }; editor?: { requestClose: boolean; }; diff --git a/public/scripts/config.json b/public/scripts/config.json index 2766acf1fb..f48a53d925 100644 --- a/public/scripts/config.json +++ b/public/scripts/config.json @@ -19,7 +19,7 @@ "checkDomain": false }, "oauth2": { - "publicClient": true + "origin": "http://oauth.test.test" }, "firebase": { "fetchTimeoutMillis": 3600000,