mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-18 22:09:46 +00:00
Update API Key jwtAuthCheck to check user active status
This commit is contained in:
parent
6d3773a0b8
commit
874e9e1856
1 changed files with 7 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue