Skip to content

Commit

Permalink
chore: change appid
Browse files Browse the repository at this point in the history
  • Loading branch information
thisyahlen-deriv committed Oct 14, 2024
1 parent f828b73 commit febc538
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/UserNavbarItem/item.desktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion src/features/Callback/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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(),
});

Expand Down

0 comments on commit febc538

Please sign in to comment.