|
|
@@ -36,8 +36,8 @@ export function generateToken(userId: string, phone?: string): string {
|
|
|
console.log('🎫 生成Token - secret:', config.jwt.secret);
|
|
|
console.log('🎫 生成Token - JWT_SECRET env:', process.env.JWT_SECRET);
|
|
|
const payload: Omit<JwtPayload, 'iat' | 'exp'> = { userId, phone };
|
|
|
- return jwt.sign(payload, config.jwt.secret, {
|
|
|
- expiresIn: config.jwt.expiresIn,
|
|
|
+ return jwt.sign(payload, config.jwt.secret as any, {
|
|
|
+ expiresIn: config.jwt.expiresIn as any,
|
|
|
});
|
|
|
}
|
|
|
|