diff --git a/src/app/pages/LoginPage/LoginPage.tsx b/src/app/pages/LoginPage/LoginPage.tsx index 4b5d9683..439dfe78 100644 --- a/src/app/pages/LoginPage/LoginPage.tsx +++ b/src/app/pages/LoginPage/LoginPage.tsx @@ -70,9 +70,9 @@ const LoginPage = () => { setIsExiting(true); setTimeout(() => { if (window.electron) { - window.open(authConfig.authUrl, '_blank'); + window.open(authConfig.authUrl.electron, '_blank'); } else { - window.location.href = authConfig.authUrl; + window.location.href = authConfig.authUrl.react; } }, 700); }; diff --git a/src/app/shared/config/auth.ts b/src/app/shared/config/auth.ts index c82709b0..ce40571f 100644 --- a/src/app/shared/config/auth.ts +++ b/src/app/shared/config/auth.ts @@ -5,7 +5,10 @@ import { ROUTES_CONFIG } from '@/router/routesConfig'; import { getAccessToken, getIsOnboardingCompleted } from '../utils/auth'; export const authConfig = { - authUrl: import.meta.env.VITE_MORIB_AUTH_URL, + authUrl: { + react: `${import.meta.env.VITE_MORIB_AUTH_URL}?type=web`, + electron: `${import.meta.env.VITE_MORIB_AUTH_URL}?type=electron`, + }, isAuthenticated: () => { const accessToken = getAccessToken();