Public Access
feat: enhance security with token blacklisting and input sanitization; add helmet for security headers
This commit is contained in:
1 parent
4935251125
commit
1b5fd04040
25 files changed
+294
-90
No files matched your search
@@ -20,3 +20,7 @@ export function verifyToken(token: string): JwtPayload {
|
||||
export function generateVerificationToken(): string {
|
||||
return crypto.randomBytes(32).toString('hex')
|
||||
}
|
||||
|
||||
export function hashToken(token: string): string {
|
||||
return crypto.createHash('sha256').update(token).digest('hex')
|
||||
}
|
||||
Reference in new issue
Block a user