mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-04-10 23:07:18 +02:00
Update API Key jwtAuthCheck to check user active status
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user