Files
fabric_trade_server/dist/common/utils/jwt-secret.js
T
mohmdsdgandCursor 345a4a4708 Add SMS OTP, harden auth, and fix order/checkout server bugs.
Ship 4-digit OTP with rate-limit attempts, Tehran-safe expiry/rass math, larger JSON body limit for check images, and safer order pricing/status guards. Include rebuilt dist for prebuilt deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:55:26 +03:30

14 lines
486 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveJwtSecret = resolveJwtSecret;
const DEV_FALLBACK = 'fabric-trade-dev-secret';
function resolveJwtSecret(config) {
const secret = config.get('JWT_SECRET')?.trim();
if (secret)
return secret;
if (config.get('NODE_ENV') === 'production') {
throw new Error('JWT_SECRET تنظیم نشده است');
}
return DEV_FALLBACK;
}
//# sourceMappingURL=jwt-secret.js.map