From d80d5e976b739f03249ea0f030934d6f5cca5668 Mon Sep 17 00:00:00 2001 From: William Tso Date: Thu, 24 Apr 2025 00:34:47 +0800 Subject: [PATCH] Update authentication redirect to use environment variable for site URL, ensuring proper redirection based on configuration. This change enhances flexibility for different deployment environments. --- app/auth/callback/route.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/auth/callback/route.ts b/app/auth/callback/route.ts index a974dfd..25e106b 100644 --- a/app/auth/callback/route.ts +++ b/app/auth/callback/route.ts @@ -13,5 +13,6 @@ export async function GET(request: NextRequest) { } // URL to redirect to after sign in process completes - return NextResponse.redirect(new URL('/analytics', request.url)); + const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || 'https://main.upj.to'; + return NextResponse.redirect(new URL('/analytics', siteUrl)); } \ No newline at end of file