OnSuccess redirect
I'm using TanStack Router on the frontend and Hono as the backend framework. Here's the sign-in code I'm using:
await authClient.signIn.social({
provider: "google",
fetchOptions: {
onSuccess: () => {
navigate({
to: "/dashboard",
});
},
},
});
However, after a successful Google sign-in, I'm being redirected to the backend URL (e.g., http://localhost:3000) instead of staying on the frontend/client URL (e.g., http://localhost:3001).
My Question:
How can I configure the sign-in flow to redirect back to the client application after authentication completes, instead of landing on the backend route?
await authClient.signIn.social({
provider: "google",
fetchOptions: {
onSuccess: () => {
navigate({
to: "/dashboard",
});
},
},
});
However, after a successful Google sign-in, I'm being redirected to the backend URL (e.g., http://localhost:3000) instead of staying on the frontend/client URL (e.g., http://localhost:3001).
My Question:
How can I configure the sign-in flow to redirect back to the client application after authentication completes, instead of landing on the backend route?