mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-23 00:47:46 -04:00
Update API Key jwtAuthCheck to check user active status
This commit is contained in:
parent
6d3773a0b8
commit
874e9e1856
@ -234,6 +234,13 @@ class TokenManager {
|
||||
}
|
||||
|
||||
const user = await Database.userModel.getUserById(apiKey.userId)
|
||||
|
||||
if (!user?.isActive) {
|
||||
// deny login
|
||||
done(null, null)
|
||||
return
|
||||
}
|
||||
|
||||
done(null, user)
|
||||
} else {
|
||||
// JWT based authentication
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user