mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-08 13:55:28 +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)
|
const user = await Database.userModel.getUserById(apiKey.userId)
|
||||||
|
|
||||||
|
if (!user?.isActive) {
|
||||||
|
// deny login
|
||||||
|
done(null, null)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
done(null, user)
|
done(null, user)
|
||||||
} else {
|
} else {
|
||||||
// JWT based authentication
|
// JWT based authentication
|
||||||
|
|||||||
Reference in New Issue
Block a user