diff --git a/packages/stack-server/src/app/api/v1/auth/signup/route.tsx b/packages/stack-server/src/app/api/v1/auth/signup/route.tsx index 36a4c62f4..5cddd5a8a 100644 --- a/packages/stack-server/src/app/api/v1/auth/signup/route.tsx +++ b/packages/stack-server/src/app/api/v1/auth/signup/route.tsx @@ -13,9 +13,6 @@ import { getPasswordError } from "@stackframe/stack-shared/dist/helpers/password import { getApiKeySet, publishableClientKeyHeaderSchema } from "@/lib/api-keys"; import { StatusError } from "@stackframe/stack-shared/dist/utils/errors"; import { KnownErrors } from "@stackframe/stack-shared"; -import { runAsynchronously } from "@stackframe/stack-shared/dist/utils/promises"; - -export const maxDuration = 60; const postSchema = yup.object({ headers: yup.object({ @@ -108,7 +105,11 @@ export const POST = deprecatedSmartRouteHandler(async (req: NextRequest) => { throw new KnownErrors.RedirectUrlNotWhitelisted(); } - runAsynchronously(sendVerificationEmail(projectId, newUser.projectUserId, emailVerificationRedirectUrl)); + try { + await sendVerificationEmail(projectId, newUser.projectUserId, emailVerificationRedirectUrl); + } catch (error) { + console.error(error); + } return NextResponse.json({ access_token: accessToken,