diff options
Diffstat (limited to 'lib/auth.js')
| -rw-r--r-- | lib/auth.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/auth.js b/lib/auth.js index 55de6df0..0e96218a 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -7,7 +7,7 @@ export const optional = { preValidation: fastifyPassport.authenticate( "jwt", { session: false }, - function(req, res, err, user, info) { + function (req, res, err, user, info) { req.user = user; } ) @@ -29,7 +29,7 @@ export const jwtStrategy = new jwt.Strategy( { jwtFromRequest: jwt.ExtractJwt.fromExtractors([ jwt.ExtractJwt.fromAuthHeaderAsBearerToken(), - req => (req.cookies ? req.cookies.token : null) + (req) => (req.cookies ? req.cookies.token : null) ]), secretOrKey: config.jwt }, |
