ദ്ദി /ᐠ˵- ⩊ -˵マ
CCConvex Community
•Created by ദ്ദി /ᐠ˵- ⩊ -˵マ on 8/30/2024 in #support-community
Convex Auth on React Native (expo)
I'm trying to connect my convex backend to a react native app made with expo.
This backend is already used by my ReactJS app which is external to this expo project. I simply want the two projects to share the same database.
The problem I'm having is with the OAuth connection to Google. My current configuration of Convex *(env variables) * is designed to work with the web version. I can't find a solution allowing me to connect Google OAuth with Convex Auth without getting these errors:
1. “redirect_uri_mismatch” from Google when my configuration seems incomplete because the Google cloud console only gives me a client ID without ‘Client Secret’.
2. This one on my convex endpoint when I try with my web configuration on my localhost:3000.
{"code":"[Request ID: 6e40602255f030a2] Server Error: Uncaught Error: Invalid
redirectTo exp://192.168.X.XX:3000 for configured SITE_URL: http://localhost:3000","trace":"Uncaught Error: Invalid
redirectTo exp://192.168.X.XX:3000 for configured SITE_URL: http://localhost:3000\n [...]
3. This Google Cloud Console error prevents me from “whitelisting” the uri given by expo during development (exp://192.168.X.XX:3000)
“Invalid origin: the URI must end with a public top-level domain extension, such as .com or .org.”
PS: This error seems totally unreasonable to me, since my localhost:3000 url works without a hitch.
I think I've come full circle and I'm left with no ideas. How should I configure this Google OAuth in Expo React Native with Convex Auth?9 replies