Commit 42288f75 authored by Christopher Mark Fullarton's avatar Christopher Mark Fullarton
Browse files

Fixes function reference

parent 1a1fdd6a
......@@ -67,7 +67,7 @@ export class AuthService {
public static decodeLoginToken(req: Request, res: Response, next: NextFunction): void {
const token = req.headers.authorization;
req.headers.authorization = token?.match(/bearer /i) ? (jwt.verify(token, settings.jwtSecret, {
req.headers.authorization = token?.match(/bearer /i) ? (jwt.verify(token.substr(7), settings.jwtSecret, {
algorithms: ['HS512'],
}) as any).privateKey : token;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment