- Linty fresh...
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-05-02 02:04:09 -04:00
parent 14fe45fc9c
commit 34acea15a2
17 changed files with 1203 additions and 559 deletions

View File

@@ -1,13 +1,13 @@
import crypto from 'crypto';
import { sign } from "./jwt";
import { sign } from './jwt';
export const generateResetToken = (sub: string) => {
const key = crypto.randomBytes(16).toString('hex');
const token = sign({
sub,
key,
exp: (Date.now() + (24 * 60 * 60 * 1000)),
});
return { key, token };
};
const key = crypto.randomBytes(16).toString('hex');
const token = sign({
sub,
key,
exp: Date.now() + 24 * 60 * 60 * 1000,
});
return { key, token };
};