Promote dev→uat: OAuth callback session fix (GRO-1236)
This commit is contained in:
@@ -1 +1 @@
|
||||
VITE_API_URL=
|
||||
VITE_API_URL=https://uat.groombook.dev
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user