After signup (both direct registration and LinkedIn OAuth), users are now redirected to the home landing page without being logged in.
frontend/src/contexts/AuthContext.tsx
- Updated
registerfunction to log out the user immediately after signup - Supabase auto-logs in users on
signUp(), so we explicitly sign them out - Clear all session data and localStorage
- Show success toast: "Your account has been created successfully!"
frontend/src/app/auth/register/page.tsx
- Redirect to
/?signup=successafter successful registration - Added 1.5s delay to allow success toast to be visible
frontend/src/app/auth/callback/page.tsx
- For new OAuth signups, log out the user immediately
- Redirect to
/?signup=successinstead of auto-login - Existing OAuth users still login normally
frontend/src/app/page.tsx
- Converted to client component to handle query parameters
- Detect
?signup=successparameter and show success toast - Clean up URL after showing toast
Changed toast notification colors to use dark red for errors and green for success.
frontend/src/components/ui/toast.tsx
- Success toast: Dark green background (
bg-green-600) with white text - Error toast: Dark red background (
bg-red-900) with white text - Improved visibility and contrast
frontend/src/app/auth/register/page.tsx
- LinkedIn button now says "LinkedIn" (simplified)
frontend/src/app/auth/pending-approval/page.tsx
- Removed "Back to Login" button
- Only "Go to Home" button with black background
- User fills registration form
- Account created in Supabase
- User profile created in database
- User immediately logged out (no auto-login)
- Redirect to home page with success toast
- Success toast shows: "Your account has been created successfully!"
- User clicks "LinkedIn" button
- Redirected to LinkedIn for authentication
- Returns to callback page
- New profile created in database
- User immediately logged out (no auto-login)
- Redirect to home page with success toast
- Success toast shows: "Your account has been created successfully!"
- User clicks "LinkedIn" button
- Redirected to LinkedIn for authentication
- Returns to callback page
- User profile found in database
- User logged in successfully
- Redirect based on approval status:
- Pending →
/auth/pending-approval - Approved →
/dashboard - Other →
/(home)
- Pending →
- Background:
bg-green-600(dark green) - Text: White
- Border:
border-green-700 - Examples:
- "Signup successful - Your account has been created successfully!"
- "Login successful - Welcome back!"
- Background:
bg-red-900(dark red) - Text: White
- Border:
border-red-700 - Examples:
- "Signup error - Email already exists"
- "Login error - Invalid credentials"
- ✅
frontend/src/contexts/AuthContext.tsx- Signup logout logic - ✅
frontend/src/app/auth/register/page.tsx- Redirect to home after signup - ✅
frontend/src/app/auth/callback/page.tsx- OAuth signup logout logic - ✅
frontend/src/components/ui/toast.tsx- Dark red and green colors - ✅
frontend/src/app/page.tsx- Show signup success toast - ✅
frontend/src/app/auth/pending-approval/page.tsx- Button updates
- Direct signup redirects to home (not logged in)
- Success toast appears after direct signup (green)
- LinkedIn signup redirects to home (not logged in)
- Success toast appears after LinkedIn signup (green)
- LinkedIn login works for existing users
- Error toasts show in dark red
- Success toasts show in green
- URL parameter cleaned after showing toast
- Pending approval page shows only "Go to Home" button
- ❌ User auto-logged in after signup
- ❌ Toast colors were light and hard to read
- ❌ Multiple buttons on pending page
- ✅ User NOT logged in after signup (lands on home page)
- ✅ Clear success message with dark green toast
- ✅ Clean, simple pending approval page
- ✅ Consistent experience for both signup methods
After signup, users should:
- See the success toast on home page
- Wait for admin approval (24-48 hours)
- Receive email notification when approved
- Return to login page to access their account
Last Updated: October 2, 2025