log dates
This commit is contained in:
parent
3d289474bf
commit
967641e213
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user