From 6b884d1fd7e6eb6045856b60701979c298ecd8b4 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Fri, 17 Jan 2025 23:13:45 +0800 Subject: [PATCH] fix: allow set cookie on verify-totp --- apps/main/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/main/src/index.ts b/apps/main/src/index.ts index e49b44a49c..47e54b5e09 100644 --- a/apps/main/src/index.ts +++ b/apps/main/src/index.ts @@ -129,7 +129,10 @@ function bootstrap() { // handle session cookie when sign in with email in electron session.defaultSession.webRequest.onHeadersReceived( { - urls: [`${apiURL}/better-auth/sign-in/email?*`], + urls: [ + `${apiURL}/better-auth/sign-in/email?*`, + `${apiURL}/better-auth/two-factor/verify-totp?*`, + ], }, (detail, callback) => { const { responseHeaders } = detail