From 71fff38aef839a749ebde45f5cad096d94644b72 Mon Sep 17 00:00:00 2001 From: Kaio Cesar Date: Fri, 21 Mar 2025 22:50:23 -0300 Subject: feat(auth): Added env variable for OAuth timeout (#1136) * feat(auth): add configurable OAuth timeout option * fix(config): change OAUTH_TIMEOUT to use z.coerce.number for better type handling * docs: Added instructions for OAUTH_TIMEOUT flag --- apps/web/server/auth.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/web/server/auth.ts') diff --git a/apps/web/server/auth.ts b/apps/web/server/auth.ts index ee226743..8fa60a75 100644 --- a/apps/web/server/auth.ts +++ b/apps/web/server/auth.ts @@ -114,6 +114,9 @@ if (oauth.wellKnownUrl) { allowDangerousEmailAccountLinking: oauth.allowDangerousEmailAccountLinking, idToken: true, checks: ["pkce", "state"], + httpOptions: { + timeout: oauth.timeout, + }, async profile(profile: Record) { const [admin, firstUser] = await Promise.all([ isAdmin(profile.email), -- cgit v1.2.3-70-g09d2