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')) }