mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
chore: vercel preview
This commit is contained in:
@@ -23,6 +23,7 @@ export async function login(
|
||||
return await Sentry.withServerActionInstrumentation("login", {}, async () => {
|
||||
const supabase = await getServerSupabase();
|
||||
const api = new BackendAPI();
|
||||
const isVercelPreview = process.env.VERCEL_ENV === "preview";
|
||||
|
||||
if (!supabase) {
|
||||
redirect("/error");
|
||||
@@ -30,7 +31,7 @@ export async function login(
|
||||
|
||||
// Verify Turnstile token if provided
|
||||
const success = await verifyTurnstileToken(turnstileToken, "login");
|
||||
if (!success) {
|
||||
if (!success && !isVercelPreview) {
|
||||
return "CAPTCHA verification failed. Please try again.";
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export async function signup(
|
||||
{},
|
||||
async () => {
|
||||
const supabase = await getServerSupabase();
|
||||
const isVercelPreview = process.env.VERCEL_ENV === "preview";
|
||||
|
||||
if (!supabase) {
|
||||
redirect("/error");
|
||||
@@ -25,7 +26,7 @@ export async function signup(
|
||||
|
||||
// Verify Turnstile token if provided
|
||||
const success = await verifyTurnstileToken(turnstileToken, "signup");
|
||||
if (!success) {
|
||||
if (!success && !isVercelPreview) {
|
||||
return "CAPTCHA verification failed. Please try again.";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user