Browse Source

fix: token revocation incorrect TTL

pull/2109/head
NGPixel 4 years ago
parent
commit
a25431bcf8
1 changed files with 1 additions and 2 deletions
  1. 3
      server/core/auth.js

3
server/core/auth.js

@ -438,7 +438,6 @@ module.exports = {
* Add user / group ID to JWT revokation list, forcing all requests to be validated against the latest permissions * Add user / group ID to JWT revokation list, forcing all requests to be validated against the latest permissions
*/ */
revokeUserTokens ({ id, kind = 'u' }) { revokeUserTokens ({ id, kind = 'u' }) {
console.info(Math.ceil(ms(WIKI.config.auth.tokenRenewal) / 1000))
WIKI.auth.revokationList.set(`${kind}${_.toString(id)}`, true, Math.ceil(ms(WIKI.config.auth.tokenRenewal) / 1000))
WIKI.auth.revokationList.set(`${kind}${_.toString(id)}`, true, Math.ceil(ms(WIKI.config.auth.tokenExpiration) / 1000))
} }
} }
Loading…
Cancel
Save