web-backset.cn/apps/server/src/config/constant.ts

19 lines
352 B
TypeScript

/**
* token 在 cookie 的 key
*/
export const SECURE_SIGN = 'secure_sign';
/**
* jwt token配置
*/
export const TOKEN = {
/**
* Cookie被删除时的时间戳, 60 * 60 * 1000 * 24 一天过期
*/
EXPIRES: new Date(Date.now() + 60 * 1000 * 60 * 24),
/**
* token续签的时间戳阈值
*/
RESIGN_LIMIT: 60 * 60 * 1000 * 1,
};