How does callbackURL work with expo routing

Hey I'm new here and I'm trying to use the callbackURL in the authClient.signUp.email function. I tried to read several answers about this topic on this server and tried to read the docs but just got more confused. As far as I understood, it redirects the user to the page of the path assigned to callbackURL upon successful signup. I am talking about expo routing. So, for example /(protected)/(onboarding) or something like that. But maybe I got it totally wrong, would really appreciate some clarification.
4 Replies
Melina Jáuregui
@germanymaster could you understand how this works? I have the same doubt
Chandra
Chandra2mo ago
const handleGoogleSignIn = async () => {
await authClient.signIn.social({
provider: "google",
callbackURL: "tezwealth://app",
fetchOptions: {
onRequest: () => {
setIsLoading(true);
},
onSuccess: () => {
setIsLoading(false);
},
onError: (error) => {
console.error("Google sign-in error:", error);
setIsLoading(false);
},
},
});
};
const handleGoogleSignIn = async () => {
await authClient.signIn.social({
provider: "google",
callbackURL: "tezwealth://app",
fetchOptions: {
onRequest: () => {
setIsLoading(true);
},
onSuccess: () => {
setIsLoading(false);
},
onError: (error) => {
console.error("Google sign-in error:", error);
setIsLoading(false);
},
},
});
};
docs mentioned that don't use schema of the app in url but it doesn't work for me. this works fine for me
FalconiZzare
FalconiZzare2mo ago
There are 2 types of callBackUrl utilization in expo, one is internal expo route redirection and one is deep linking,? Deep linking is needed when you go outside of the app and need to come back to an specific screen of the app like Expo Web or normal web. Deeplinking may need the callbackurl along with app schema, in app routing just needs relative path.
Chandra
Chandra2mo ago
I have set the schema in createAuthClient but still need to pass the schema here

Did you find this page helpful?