reduce exp time
This commit is contained in:
parent
fa68bc1685
commit
8219606297
@ -61,7 +61,7 @@ export const createLoginMiddleware = (knex: Knex)=>{
|
||||
const payload = sign({
|
||||
username: user.username,
|
||||
permission: userPermission
|
||||
},secretKey,{expiresIn:'3d'});
|
||||
},secretKey,{expiresIn:'3h'});
|
||||
ctx.cookies.set(loginTokenName,payload,{httpOnly:true, secure: !setting.localmode,sameSite:'strict'});
|
||||
ctx.body = {ok:true, username: user.username, permission: userPermission}
|
||||
console.log(`${username} logined`);
|
||||
|
Loading…
Reference in New Issue
Block a user