fix: refs #7811 Renew token crash
This commit is contained in:
parent
83f3a05721
commit
2dc095e828
|
@ -30,8 +30,11 @@ module.exports = Self => {
|
|||
|
||||
// Schedule to remove current token
|
||||
setTimeout(async() => {
|
||||
if (await models.AccessToken.findById(token.id))
|
||||
try {
|
||||
await Self.logout(token.id);
|
||||
} catch (error) {
|
||||
// FIXME: Crash if do throw new Error(error)
|
||||
}
|
||||
}, courtesyTime * 1000);
|
||||
|
||||
// Get scopes
|
||||
|
|
Loading…
Reference in New Issue