Skip to content

Commit

Permalink
🐳 chore(utils): create verify jwt
Browse files Browse the repository at this point in the history
  • Loading branch information
EvandroCalado committed Feb 22, 2024
1 parent 7d7f73d commit 6d68ad1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions utils/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ export const createJwt = (payload) => {
});
return token;
};

export const verifyJwt = (token) => {
const decoded = jwt.verify(token, process.env.JWT_SECRET);
return decoded;
};

0 comments on commit 6d68ad1

Please sign in to comment.