How does node koa-jwt Refresh Token?

learn node+koa developer is writing a simple example and using token

app.use(jwtKoa({secret}).unless({
    path: [/^\/adduser/, /^\/login/] //jwt
}))

when you log in, return to the frontend token and set it to be valid for one hour, but if the token fails, you don"t want the user to log in again to get the token, but want to refresh the token. What should I do?

jwt.sign({
    name: islogin[0].username,
    //  token 
    exp: 60 * 60, // 60 seconds * 60 minutes = 1 hour
  }, secret)
Apr.11,2021

Refresh Token is not in the category of jwt . You need to implement the logic of Refresh Token yourself. For example, when you listen to the error type expired of jwt , update token .

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32e90-2be45.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32e90-2be45.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?