Finishing touches to publish
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-05-03 11:38:41 -04:00
parent dc72cefece
commit 32bfbd7adc
15 changed files with 36 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
import crypto from 'crypto';
import { sign } from './jwt';
import { LOGIN_VALID_TIME, RESET_VALID_MINUTES } from '../constants/constants';
import { LOGIN_VALID_TIME, RESET_VALID_MINUTES } from '../constants/env';
import { Status } from '../constants/auth';
const parseLoginValid = () => {
@@ -14,12 +14,12 @@ const parseLoginValid = () => {
};
export const generateLoginToken = (sub: string, status: Status) => {
const [days, hours, mins] = parseLoginValid();
return sign({
sub,
status,
exp: Date.now() + days * hours * mins * 60 * 1000,
});
const [days, hours, mins] = parseLoginValid();
return sign({
sub,
status,
exp: Date.now() + days * hours * mins * 60 * 1000,
});
};
export const generateResetToken = (sub: string) => {