We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86dddad commit 597b04eCopy full SHA for 597b04e
src/middleware/auth.js
@@ -6,7 +6,7 @@ const auth = async (req, res, next)=>{
6
// next()
7
try{
8
const token = req.header('Authorization').replace('Bearer ', '')
9
- const decoded = jwt.verify(token, process.env.JWT_SECRET)
+ const decoded = jwt.verify(token, process.env.JWT_SECRE)
10
const user = await User.findById({_id: decoded._id, 'tokens.token': token})
11
// const tokenExp = decoded.exp
12
// const date=Math.round(new Date().getTime()/1000 )
0 commit comments