Promote dev→uat: OAuth callback session fix (GRO-1236)

This commit is contained in:
2026-05-14 19:25:42 +00:00
committed by The Dogfather [agent]
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
VITE_API_URL=
VITE_API_URL=https://uat.groombook.dev
+4 -1
View File
@@ -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);