Browse Source

fix: sidebar is empty when the jwt token is expired (#2037)

pull/2051/head
Regev Brody 4 years ago
committed by GitHub
parent
commit
4ffd1325bd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
  1. 1
      server/core/auth.js

1
server/core/auth.js

@ -118,6 +118,7 @@ module.exports = {
const newToken = await WIKI.models.users.refreshToken(jwtPayload.id)
user = newToken.user
user.permissions = user.getGlobalPermissions()
user.groups = user.getGroups()
req.user = user
// Try headers, otherwise cookies for response

Loading…
Cancel
Save