Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Jan 13, 2024
1 parent 607240c commit 059e083
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion telematic_system/telematic_apps/web_app/server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ var verifyToken = (req) => {
//Authorization: 'TOKEN'
const token = req.headers.authorization;
if (token) {
const decodedToken = jwt.verify(token, process.env.SECRET);
const decodedToken = jwt.verify(token, process.env.SECRET);
console.log(decodedToken)
if (decodedToken && decodedToken.exp > (new Date().getTime() / 1000)) {
return true;
}
Expand Down

0 comments on commit 059e083

Please sign in to comment.