From febc538e45212d4508098abeedcf5bf00173b7f9 Mon Sep 17 00:00:00 2001 From: Thisyahlen Date: Mon, 14 Oct 2024 16:25:40 +0800 Subject: [PATCH] chore: change appid --- src/components/UserNavbarItem/item.desktop.tsx | 3 ++- src/features/Callback/index.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/UserNavbarItem/item.desktop.tsx b/src/components/UserNavbarItem/item.desktop.tsx index 44af5898..32a21933 100644 --- a/src/components/UserNavbarItem/item.desktop.tsx +++ b/src/components/UserNavbarItem/item.desktop.tsx @@ -16,6 +16,7 @@ const UserNavbarDesktopItem = ({ authUrl, is_logged_in }: IUserNavbarItemProps) // location.assign(authUrl); const oidc = `https://${serverUrl}/.well-known/openid-configuration`; + const appid = localStorage.getItem('config.app_id'); try { const response = await fetch(oidc); @@ -32,7 +33,7 @@ const UserNavbarDesktopItem = ({ authUrl, is_logged_in }: IUserNavbarItemProps) const userManager = new UserManager({ authority: data.issuer, - client_id: '1011', + client_id: appid, redirect_uri: 'https://deriv-api-docs-git-fork-thisyahlen-deriv-thisyahlen-oidc.binary.sx/callback', response_type: 'code', diff --git a/src/features/Callback/index.tsx b/src/features/Callback/index.tsx index 7ca3d59d..147ac127 100644 --- a/src/features/Callback/index.tsx +++ b/src/features/Callback/index.tsx @@ -24,6 +24,7 @@ export default function CallbackComponent() { const oidc_data = localStorage.getItem(oidc_key); const code_verifier = oidc_data ? JSON.parse(oidc_data).code_verifier : null; + const appId = localStorage.getItem('config.app_id'); if (!code_verifier) return; @@ -39,7 +40,7 @@ export default function CallbackComponent() { 'https://deriv-api-docs-git-fork-thisyahlen-deriv-thisyahlen-oidc.binary.sx/callback', code: code, code_verifier: code_verifier, - client_id: '1011', + client_id: appId, }).toString(), });