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