From 28367293e818cd63b193a4ede7cdf484b217f072 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Sun, 31 Aug 2025 22:02:19 +0200 Subject: [PATCH] Remove ugly spinner pages from auth flow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace loading spinners and styling with minimal HTML pages - Auth flow now happens almost instantly without visible intermediary screens - Reduced bundle size for login/logout endpoints (0.59kB and 0.58kB) - Maintains seamless user experience while preserving Auth.js integration - Users stay on current page context during auth transitions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/routes/login/+server.ts | 12 +++--------- src/routes/logout/+server.ts | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/src/routes/login/+server.ts b/src/routes/login/+server.ts index f0a20fe..da37db3 100644 --- a/src/routes/login/+server.ts +++ b/src/routes/login/+server.ts @@ -3,25 +3,19 @@ import type { RequestHandler } from './$types'; export const GET: RequestHandler = async ({ url }) => { const callbackUrl = url.searchParams.get('callbackUrl') || '/'; - // Create an auto-submitting form that POSTs to Auth.js signin + // Create a minimal page that immediately triggers auth in the same window const html = ` - Redirecting to login... - + Login -

Redirecting to login...

-
diff --git a/src/routes/logout/+server.ts b/src/routes/logout/+server.ts index ab301f8..301b302 100644 --- a/src/routes/logout/+server.ts +++ b/src/routes/logout/+server.ts @@ -3,25 +3,19 @@ import type { RequestHandler } from './$types'; export const GET: RequestHandler = async ({ url }) => { const callbackUrl = url.searchParams.get('callbackUrl') || '/'; - // Create an auto-submitting form that POSTs to Auth.js signout + // Create a minimal page that immediately triggers logout in the same window const html = ` - Signing out... - + Logout -

Signing out...

-