bump token length to 36bytes

This commit is contained in:
May 2023-10-01 17:42:00 -07:00
parent 11602b5556
commit 261b81ee04

View file

@ -12,7 +12,7 @@ export interface AuthToken {
export function create(id:string,expire:number=(24*60*60*1000)) { export function create(id:string,expire:number=(24*60*60*1000)) {
let token = { let token = {
account:id, account:id,
token:crypto.randomBytes(12).toString('hex'), token:crypto.randomBytes(36).toString('hex'),
expire:Date.now()+expire expire:Date.now()+expire
} }