log dates

This commit is contained in:
OxSaitama 2023-09-25 10:43:32 +02:00
parent 3d289474bf
commit 967641e213

View File

@ -84,11 +84,14 @@ export default class AuthService extends BaseService {
};
}
public generateAccessToken(user: any): string {
return jwt.sign({ ...user, iat: Math.floor(Date.now() / 1000)}, this.variables.ACCESS_TOKEN_SECRET, { expiresIn: "15m" });
console.log("date now", Date.now());
console.log("date local", new Date().toLocaleString())
console.log("date iso",new Date().toISOString());
return jwt.sign({ ...user}, this.variables.ACCESS_TOKEN_SECRET, { expiresIn: "15m" });
}
public generateRefreshToken(user: any): string {
return jwt.sign({ ...user, iat: Math.floor(Date.now() / 1000)}, this.variables.REFRESH_TOKEN_SECRET, { expiresIn: "1h" });
return jwt.sign({ ...user}, this.variables.REFRESH_TOKEN_SECRET, { expiresIn: "1h" });
}
public verifyAccessToken(token: string, callback?: VerifyCallback) {