From ac573dcaedd247507e8618a274451a617f7871c1 Mon Sep 17 00:00:00 2001 From: Deepak Pandey Date: Mon, 15 Sep 2025 11:15:29 +0530 Subject: [PATCH] Fix OAuth redirect and improve complete-profile UI - Fix OAuth redirect to localhost by adding queryParams to Google sign-in - Improve input text visibility in complete-profile page: - Remove backdrop-blur and semi-transparent backgrounds - Change text color from gray-900 to black with font-medium - Fix username validation styling (remove opacity from success/error states) - Ensure OAuth flow works correctly for local development - Maintain production OAuth functionality --- app/auth/signin/page.tsx | 4 ++++ app/complete-profile/page.tsx | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/auth/signin/page.tsx b/app/auth/signin/page.tsx index 99d4bca5..1c543369 100644 --- a/app/auth/signin/page.tsx +++ b/app/auth/signin/page.tsx @@ -94,6 +94,10 @@ function SignInForm() { redirectTo: typeof window !== "undefined" ? `${window.location.origin}/auth/callback?returnUrl=${encodeURIComponent(returnUrl)}` : undefined, + queryParams: { + access_type: 'offline', + prompt: 'consent', + }, }, }); } catch (error) { diff --git a/app/complete-profile/page.tsx b/app/complete-profile/page.tsx index 448d8a9a..ded953c4 100644 --- a/app/complete-profile/page.tsx +++ b/app/complete-profile/page.tsx @@ -271,7 +271,7 @@ export default function CompleteProfile() {
-

+

Welcome! Let's set up your profile

@@ -290,7 +290,7 @@ export default function CompleteProfile() { type="text" value={firstName} onChange={(e) => setFirstName(e.target.value)} - className="w-full border border-gray-200 rounded-xl px-4 py-3 text-sm bg-white/50 backdrop-blur-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all duration-200 placeholder:text-gray-400 text-gray-900" + className="w-full border border-gray-200 rounded-xl px-4 py-3 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all duration-200 placeholder:text-gray-400 text-black font-medium" placeholder="Enter your first name" required /> @@ -305,7 +305,7 @@ export default function CompleteProfile() { type="text" value={lastName} onChange={(e) => setLastName(e.target.value)} - className="w-full border border-gray-200 rounded-xl px-4 py-3 text-sm bg-white/50 backdrop-blur-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all duration-200 placeholder:text-gray-400 text-gray-900" + className="w-full border border-gray-200 rounded-xl px-4 py-3 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all duration-200 placeholder:text-gray-400 text-black font-medium" placeholder="Enter your last name" required /> @@ -322,11 +322,11 @@ export default function CompleteProfile() { type="text" value={username} onChange={(e) => handleUsernameChange(e.target.value)} - className={`w-full border rounded-xl px-4 py-3 pr-20 text-sm bg-white/50 backdrop-blur-sm focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all duration-200 placeholder:text-gray-400 text-gray-900 ${ + className={`w-full border rounded-xl px-4 py-3 pr-20 text-sm bg-white focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all duration-200 placeholder:text-gray-400 text-black font-medium ${ usernameAvailable === true - ? 'border-green-300 bg-green-50/50' + ? 'border-green-300 bg-green-50' : usernameAvailable === false || usernameError - ? 'border-red-300 bg-red-50/50' + ? 'border-red-300 bg-red-50' : 'border-gray-200' }`} placeholder="Enter your username"