Skip to content

Commit f620948

Browse files
committed
Add User details to the req.user when IP match.
1 parent 4e85f73 commit f620948

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

middleware/auth.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function authenticateToken(req, res, next) {
1414
res.send({err:"Unauthorized"});
1515
}
1616

17+
req.user = payload.data;
1718
next();
1819
} catch (error) {
1920
res.status(403)

0 commit comments

Comments
 (0)