This checklist will help you configure Google OAuth and password reset functionality properly.
Go to Supabase Dashboard → Select your project → Authentication → URL Configuration
Set your production URL:
https://property-manager-ke.vercel.app
Add ALL of the following URLs (click "+ Add URL" for each):
Production:
https://property-manager-ke.vercel.app/auth-callback
https://property-manager-ke.vercel.app/reset-password
https://property-manager-ke.vercel.app/
Android APK:
com.rentmanagement.app://auth-callback
Development (optional, for local testing):
http://localhost:5173/auth-callback
http://localhost:5173/reset-password
http://localhost:5173/
Important: Click Save after adding all URLs.
Go to Authentication → Providers → Google
- ✅ Check "Enable Sign in with Google"
- Enter your Client ID from Google Cloud Console
- Enter your Client Secret from Google Cloud Console
- (Optional) Add Authorized Client IDs if using mobile apps
- Click Save
Note the Callback URL shown in Supabase:
https://emdahodfztpfdjkrbnqz.supabase.co/auth/v1/callback
You'll need this for Google Cloud Console setup.
Go to Authentication → Email Templates → Reset Password
Ensure the template includes a link like:
{{ .SiteURL }}/reset-password#type=recovery&access_token={{ .Token }}
Default template should work, but verify it redirects to /reset-password.
Go to Google Cloud Console
- Select your project (or create a new one)
- Navigate to APIs & Services → Credentials
- If you don't have OAuth credentials, click + CREATE CREDENTIALS → OAuth client ID
- Application type: Web application
- Name:
Landee & Moony Production
Add the following origins:
Production:
https://property-manager-ke.vercel.app
https://emdahodfztpfdjkrbnqz.supabase.co
Development (optional):
http://localhost:5173
Add BOTH of these URIs:
Supabase Callback (REQUIRED):
https://emdahodfztpfdjkrbnqz.supabase.co/auth/v1/callback
Your App Callback (for fallback):
https://property-manager-ke.vercel.app/auth-callback
Development (optional):
http://localhost:5173/auth-callback
- Click Save
- Copy the Client ID and Client Secret
- Add them to Supabase (see Supabase step 2 above)
Ensure your Vercel project has these environment variables set:
Go to Vercel Dashboard → Your Project → Settings → Environment Variables
Required variables:
SUPABASE_URL=https://emdahodfztpfdjkrbnqz.supabase.co
SUPABASE_ANON_KEY=eyJhbGc...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGc...
VITE_SUPABASE_URL=https://emdahodfztpfdjkrbnqz.supabase.co
VITE_SUPABASE_ANON_KEY=eyJhbGc...
Important: After adding/changing environment variables, you must redeploy your application.
- Clear browser cache and cookies
- Go to https://property-manager-ke.vercel.app
- Click "Sign in with Google"
- Complete Google sign-in
- Should redirect to
/auth-callback→ then/dashboard
Expected behavior:
- No 401 errors in console
- Smooth redirect flow
- User lands on dashboard
If it fails:
- Check browser console for errors
- Verify redirect URLs are saved in Supabase
- Verify Google OAuth callback URL matches Supabase URL exactly
- Go to https://property-manager-ke.vercel.app/forgot-password
- Enter your email address
- Check your email inbox
- Click the password reset link
- Should land on
/reset-passwordpage (NOT show "Invalid Link") - Enter new password and submit
- Should redirect to
/loginpage - User must sign in again with the new password
Expected behavior:
- Email received within 1-2 minutes
- Reset link opens properly
- No "Invalid Reset Link" error
- Password updates successfully
- Session is cleared after password reset
- User is redirected to login page
- Success message shown: "Password Reset Complete"
- User must log in with new password (not auto-logged in)
If it fails:
- Check Supabase email template has correct redirect URL
- Verify
/reset-passwordis in Supabase redirect URLs - Check browser console for hash parameter errors
Causes:
- Redirect URLs not saved in Supabase
- Google Cloud Console callback URL doesn't match Supabase
- OAuth credentials not properly configured
Solutions:
- Double-check ALL redirect URLs are saved in Supabase (click Save!)
- Verify Google callback URL is EXACTLY:
https://emdahodfztpfdjkrbnqz.supabase.co/auth/v1/callback - Wait 5-10 minutes for Google OAuth changes to propagate
Causes:
/reset-passwordnot in Supabase redirect URLs- Hash parameters being stripped from URL
- Session expired before clicking link
Solutions:
- Add
https://property-manager-ke.vercel.app/reset-passwordto Supabase redirect URLs - Click the reset link within 1 hour of receiving email
- Ensure email template uses
{{ .SiteURL }}/reset-passwordformat
Causes:
- Backend not setting httpOnly cookie
- CORS issues between frontend and API
- Session sync failing
Solutions:
- Check
/api/auth?action=set-sessionendpoint is called successfully - Verify cookies are set in browser DevTools → Application → Cookies
- Check Vercel function logs for errors
Run these in browser console on your site to verify configuration:
// Check if Supabase client is configured
console.log('Supabase URL:', import.meta.env.VITE_SUPABASE_URL);
// Check current session
const { data, error } = await window.supabase?.auth.getSession();
console.log('Session:', data, error);
// Check auth cookies
console.log('Cookies:', document.cookie);Before considering setup complete, verify:
- Supabase Site URL is set to your production domain
- All redirect URLs added to Supabase (OAuth callback, reset-password, root)
- Google OAuth provider enabled in Supabase with credentials
- Google Cloud Console has Supabase callback URL in authorized redirect URIs
- Environment variables set in Vercel
- Application redeployed after environment variable changes
- Google OAuth login tested successfully
- Password reset flow tested successfully
- No console errors during authentication
- Supabase Auth Docs: https://supabase.com/docs/guides/auth
- Google OAuth Setup: https://developers.google.com/identity/protocols/oauth2
- Vercel Deployment: https://vercel.com/docs
Last Updated: January 2, 2026 Status: Configuration updated - requires external setup in Supabase and Google Cloud Console