mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-04-18 04:59:44 +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)
|
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue