hm
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { verify } from 'jsonwebtoken'
|
||||
import jwt from 'jsonwebtoken'
|
||||
|
||||
import config from '#application/config'
|
||||
import Logger, { LoggerType } from '#application/logger'
|
||||
@ -39,7 +39,7 @@ class SocketAuthenticator {
|
||||
}
|
||||
|
||||
private verifyToken(token: string): void {
|
||||
verify(token, config.JWT_SECRET, (err: any, decoded: any) => {
|
||||
jwt.verify(token, config.JWT_SECRET, (err: any, decoded: any) => {
|
||||
if (err) {
|
||||
this.logger.error('Invalid token')
|
||||
return this.next(new Error('Authentication error'))
|
||||
|
Reference in New Issue
Block a user