From 30dcd5ddbc1a48b883f0f2ce9cf259186af65112 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Sun, 8 Feb 2026 14:29:33 +0100 Subject: [PATCH] fix: update auth callback routing to redirect to '/welcome' for pending checkouts --- app/auth/callback/page.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/auth/callback/page.tsx b/app/auth/callback/page.tsx index 0537e22..631d19e 100644 --- a/app/auth/callback/page.tsx +++ b/app/auth/callback/page.tsx @@ -52,8 +52,12 @@ function AuthCallbackContent() { const result = await setSessionAction(token, refreshToken) if (result.success && result.user) { login(result.user) - const returnTo = searchParams.get('returnTo') || '/' - router.push(returnTo) + if (typeof window !== 'undefined' && localStorage.getItem('pulse_pending_checkout')) { + router.push('/welcome') + } else { + const returnTo = searchParams.get('returnTo') || '/' + router.push(returnTo) + } } else { setError(authMessageFromErrorType('invalid')) }