I've updated useGoogleAuth.tsx to explicitly use Expo's auth proxy:
const redirectUri = AuthSession.makeRedirectUri({ useProxy: true });
// This generates: https://auth.expo.io/@suntex/KindredThis might work in Expo Go because:
- ✅ Uses HTTPS (Google's requirement)
- ✅ Goes through Expo's auth proxy
- ✅ Configured in your Google Console
When you open your app, check the console logs:
🔗 Google OAuth Redirect URI: https://auth.expo.io/@suntex/Kindred
Go to Google Cloud Console and verify your Web Application client ID has this exact redirect URI:
https://auth.expo.io/@suntex/Kindred
Important: It must match EXACTLY (case-sensitive, no trailing slash)
cd frontend
npx expo startThen:
- Open app in Expo Go
- Tap "Continue with Google"
- Check if it works!
- Google OAuth screen opens
- You can authenticate
- Redirects back to your app
- User is registered/logged in
This means: The proxy method works! You can continue using Expo Go for development.
You'll see one of these errors:
Error 1: "Invalid Redirect URI"
- The redirect URI in Google Console doesn't match
- Double-check it's exactly:
https://auth.expo.io/@suntex/Kindred
Error 2: "Authorization Error: invalid_request"
- Google is still rejecting the flow
- This means you MUST use a development build
Error 3: App doesn't open after auth
- OAuth succeeded but redirect failed
- Check your
app.jsonscheme configuration
Previously, Google.useAuthRequest() might have been generating a different redirect URI. By explicitly setting:
redirectUri: AuthSession.makeRedirectUri({ useProxy: true })We're forcing it to use Expo's HTTPS proxy, which Google should accept.
If you still get errors, it means Google is rejecting the Expo proxy for some reason. In that case, you'll need to:
-
Build a development build (the reliable solution)
cd frontend eas build --platform ios --profile development -
Or test on web (quick alternative)
npx expo start --web
Your Web Application client should have:
Client ID: 955300435674-5jut5auaic2u4k8udu6spkqf1b13uau8.apps.googleusercontent.com
Authorized JavaScript origins:
https://auth.expo.io
Authorized redirect URIs:
https://auth.expo.io/@suntex/Kindred
- ✅ Code is updated with explicit proxy redirect
- ✅ Verify Google Console configuration
- ✅ Test in Expo Go
- ❌ If it fails → Build development build
Good luck! Let me know if it works or if you see any errors. 🤞