chore: vercel preview

This commit is contained in:
Lluis Agusti
2025-07-14 16:14:58 +04:00
parent 0bb160e930
commit ee11623735
2 changed files with 4 additions and 2 deletions

View File

@@ -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.";
}

View File

@@ -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.";
}