ui fixes, input fixes, better dev workflow
All checks were successful
Deploy / deploy (push) Successful in 2m2s
Security Tests / security-non-db (push) Successful in 20s
Security Tests / security-db (push) Successful in 24s

This commit is contained in:
2026-03-10 23:01:44 -05:00
parent 809b75ea4e
commit 72334b2583
19 changed files with 319 additions and 61 deletions

View File

@@ -128,6 +128,7 @@ declare module "fastify" {
export async function buildApp(overrides: Partial<AppConfig> = {}): Promise<FastifyInstance> {
const config = { ...env, ...overrides } as AppConfig;
const isProd = config.NODE_ENV === "production";
const exposeDevVerificationCode = !isProd && config.EMAIL_VERIFY_DEV_CODE_EXPOSE;
const cookieDomain = config.COOKIE_DOMAIN || undefined;
const app = Fastify({
@@ -933,7 +934,11 @@ app.post(
userId: user.id,
emailFingerprint: fingerprintEmail(normalizedEmail),
});
return { ok: true, needsVerification: true };
return {
ok: true,
needsVerification: true,
...(exposeDevVerificationCode ? { verificationCode: code } : {}),
};
});
app.post(
@@ -1155,7 +1160,7 @@ app.post("/auth/verify/resend", codeIssueRateLimit, async (req, reply) => {
userId: user.id,
emailFingerprint: fingerprintEmail(normalizedEmail),
});
return { ok: true };
return { ok: true, ...(exposeDevVerificationCode ? { verificationCode: code } : {}) };
});
app.post(