mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
fix(desktop):route auth deep links safely
This commit is contained in:
parent
2fd7551d36
commit
65ab1cbdd4
2 changed files with 3 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ import {
|
|||
syncAutoLaunchOnStartup,
|
||||
wasLaunchedAtLogin,
|
||||
} from './modules/auto-launch';
|
||||
import { purgeLegacyAuthCutover } from './modules/auth-cutover';
|
||||
|
||||
registerGlobalErrorHandlers();
|
||||
app.setName('SurfSense');
|
||||
|
|
@ -29,6 +30,7 @@ registerIpcHandlers();
|
|||
|
||||
app.whenReady().then(async () => {
|
||||
initAnalytics();
|
||||
await purgeLegacyAuthCutover();
|
||||
const launchedAtLogin = wasLaunchedAtLogin();
|
||||
const startedHidden = shouldStartHidden();
|
||||
trackEvent('desktop_app_launched', {
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ function handleDeepLink(url: string) {
|
|||
path: parsed.pathname,
|
||||
});
|
||||
if (parsed.hostname === 'auth' && parsed.pathname === '/callback') {
|
||||
const params = parsed.searchParams.toString();
|
||||
win.loadURL(`${getServerOrigin()}/auth/callback?${params}`);
|
||||
win.loadURL(`${getServerOrigin()}/dashboard`);
|
||||
}
|
||||
|
||||
win.show();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue