promote: dev → uat (GRO-1236 OAuth callback fix) #413

Merged
the-dogfather-cto[bot] merged 2 commits from cto/gro-1236-promote-uat into uat 2026-05-14 19:36:14 +00:00
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) => { const handleSocialLogin = async (provider: string) => {
setIsLoading(true); setIsLoading(true);
setError(null); 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) { if (result?.error) {
setError(result.error.message ?? "Sign-in failed"); setError(result.error.message ?? "Sign-in failed");
setIsLoading(false); setIsLoading(false);