Invalid Callback URL on expo IOS when doing Google oauth
Hello everyone,
I’m trying out Better Auth and I’m running into an issue with my google oauth.
Error:
package version:
Relevant code:
app.json
auth.ts
authClient.ts
Sign-in.tsx
Behaviour:
Web: works as expected
On iOS (and android I guess): throws error relating to the scheme
Please can someone help me out. I would very much appreciate
4 Replies
Solution
add
business-copilot:///
as a trusted origin in your auth confighmmm. ok i’ll try that
but i felt /// was a bug or something
cause i was using the expo example
huge thanks for the quick reply
Hey @bekacru , i've done that but now another issue after the google sign in, the webview cloes and takes me back to my app but it doesn't carry me to the callbackURL stated. instead it remains on the signin page. i would have to restart the app before it takes me in. should i manually call "router.replace" after google sigin in ? or should betterAuth take care of that?
cause on the expo example i see this `
there is an issue with expo deep linking specially on expo go. Either do development build or use some kind effect like the expo example to navigate based on session
i'm on dev client
but i'll try that useEffect
thanks for your help really