File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ const AppContent: React.FC<{ passthrough: unknown }> = observer(({ passthrough }
66
66
const { isChangingToHubAppId } = useIsHubRedirectionEnabled ( ) ;
67
67
68
68
const is_app_id_set = localStorage . getItem ( 'config.app_id' ) ;
69
+ const is_change_login_app_id_set = localStorage . getItem ( 'change_login_app_id' ) ;
69
70
70
71
const [ isWebPasskeysFFEnabled , isGBLoaded ] = useGrowthbookIsOn ( {
71
72
featureFlag : 'web_passkeys' ,
@@ -115,9 +116,11 @@ const AppContent: React.FC<{ passthrough: unknown }> = observer(({ passthrough }
115
116
React . useEffect ( ( ) => {
116
117
if ( isChangingToHubAppId && ! is_app_id_set ) {
117
118
const app_id = process . env . NODE_ENV === 'production' ? 61554 : 53503 ;
118
- localStorage . setItem ( 'config.app_id' , app_id . toString ( ) ) ;
119
+ localStorage . setItem ( 'change_login_app_id' , app_id . toString ( ) ) ;
120
+ return ;
119
121
}
120
- } , [ isChangingToHubAppId , is_app_id_set ] ) ;
122
+ is_change_login_app_id_set && localStorage . removeItem ( 'change_login_app_id' ) ;
123
+ } , [ isChangingToHubAppId , is_app_id_set , is_change_login_app_id_set ] ) ;
121
124
122
125
React . useEffect ( ( ) => {
123
126
switchLanguage ( current_language ) ;
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ type TLoginUrl = {
26
26
27
27
export const loginUrl = ( { language } : TLoginUrl ) => {
28
28
const server_url = LocalStore . get ( 'config.server_url' ) ;
29
+ const change_login_app_id = LocalStore . get ( 'change_login_app_id' ) ;
29
30
// eslint-disable-next-line @typescript-eslint/no-explicit-any
30
31
const signup_device_cookie = new ( CookieStorage as any ) ( 'signup_device' ) ;
31
32
const signup_device = signup_device_cookie . get ( 'signup_device' ) ;
@@ -38,7 +39,7 @@ export const loginUrl = ({ language }: TLoginUrl) => {
38
39
const getOAuthUrl = ( ) => {
39
40
return `https://oauth.${
40
41
deriv_urls . DERIV_HOST_NAME
41
- } /oauth2/authorize?app_id=${ getAppId ( ) } &l=${ language } ${ marketing_queries } &brand=${ website_name . toLowerCase ( ) } `;
42
+ } /oauth2/authorize?app_id=${ change_login_app_id || getAppId ( ) } &l=${ language } ${ marketing_queries } &brand=${ website_name . toLowerCase ( ) } `;
42
43
} ;
43
44
44
45
if ( server_url && / q a / . test ( server_url ) ) {
You can’t perform that action at this time.
0 commit comments