mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-31 15:19:42 +02:00
Fixes for passport local and allow empty password
This commit is contained in:
parent
812395b21b
commit
7010a13648
10 changed files with 206 additions and 75 deletions
|
@ -140,7 +140,7 @@ class SocketAuthority {
|
|||
// When setting up a socket connection the user needs to be associated with a socket id
|
||||
// for this the client will send a 'auth' event that includes the users API token
|
||||
async authenticateSocket(socket, token) {
|
||||
const user = await this.Server.auth.authenticateUser(token)
|
||||
const user = await this.Server.db.users.find(u => u.token === token)
|
||||
if (!user) {
|
||||
Logger.error('Cannot validate socket - invalid token')
|
||||
return socket.emit('invalid_token')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue