diff --git a/apps/web/.env.production b/apps/web/.env.production index 292a14c..e201d90 100644 --- a/apps/web/.env.production +++ b/apps/web/.env.production @@ -1 +1 @@ -VITE_API_URL= +VITE_API_URL=https://uat.groombook.dev diff --git a/apps/web/src/App.tsx b/apps/web/src/App.tsx index f7b42c6..3e5e573 100644 --- a/apps/web/src/App.tsx +++ b/apps/web/src/App.tsx @@ -40,7 +40,10 @@ function LoginPage() { const handleSocialLogin = async (provider: string) => { setIsLoading(true); setError(null); - const result = await signIn.social({ provider, callbackURL: window.location.origin }); + // Use /admin as callback URL so Better-Auth redirects to the app's dashboard + // after the OAuth callback completes, rather than back to /login + const callbackURL = `${window.location.origin}/admin`; + const result = await signIn.social({ provider, callbackURL }); if (result?.error) { setError(result.error.message ?? "Sign-in failed"); setIsLoading(false);