mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-08 10:08:21 +00:00
14 lines
495 B
TypeScript
14 lines
495 B
TypeScript
/**
|
|
* Dev/staging bypass gate for OTP, payment and Fayda verification.
|
|
*
|
|
* Gated purely on `ENV` (dev|staging) — never on NODE_ENV, so it can't be
|
|
* mistaken for a prod-vs-non-prod switch. `ENV` is simply left unset in
|
|
* production, so this is always false there.
|
|
*/
|
|
export function isBypassEnv(): boolean {
|
|
return ["dev", "staging"].includes(process.env.ENV ?? "");
|
|
}
|
|
|
|
/** Fixed code accepted in addition to the real one when isBypassEnv(). */
|
|
export const DEV_BYPASS_OTP = "000000";
|