feat: onboarding electron redirect (#5327)

This commit is contained in:
DarkSky
2023-12-19 13:54:43 +00:00
parent 8ea910a2bb
commit 33a589a8ba
3 changed files with 45 additions and 2 deletions

View File

@@ -108,6 +108,10 @@ async function handleOauthJwt(url: string) {
ipcMain.once('affine:login', () => {
hiddenWindow?.destroy();
if (urlObj.searchParams.get('next') === 'onboarding') {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
mainWindow.loadURL(mainWindowOrigin + '/auth/onboarding');
}
});
// hacks to refresh auth state in the main window