From b06339d362815d6d04c712abd2cc7ffd4f1de867 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Thu, 16 Jan 2025 11:55:13 -0300 Subject: [PATCH] feat: handle refreshToken failure --- src/main/events/auth/open-auth-window.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/events/auth/open-auth-window.ts b/src/main/events/auth/open-auth-window.ts index 925dbdd3..0f5ec371 100644 --- a/src/main/events/auth/open-auth-window.ts +++ b/src/main/events/auth/open-auth-window.ts @@ -12,7 +12,9 @@ const openAuthWindow = async ( }); if ([AuthPage.UpdateEmail, AuthPage.UpdatePassword].includes(page)) { - const { accessToken } = await HydraApi.refreshToken(); + const { accessToken } = await HydraApi.refreshToken().catch(() => { + return { accessToken: "" }; + }); searchParams.set("token", accessToken); }