This commit is contained in:
SepehrYahyaee
2026-06-23 10:26:51 +03:30
parent c6b417ced7
commit ed2b6948cf
3 changed files with 27 additions and 1 deletions

View File

@@ -41,3 +41,10 @@ export function readOtpExpireMinutesFromEnv(): number {
const raw = Number(process.env.EXP_OTP_TIME ?? "2");
return Number.isFinite(raw) && raw > 0 ? raw : 2;
}
/** Dev-only: skip SMS provider and accept a fixed OTP for any mobile. */
export const FAKE_OTP_CODE = "12345";
export function isFakeOtpEnabled(): boolean {
return process.env.FAKE_OTP === "true";
}