Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk authored Feb 2, 2024
1 parent 6d245b0 commit ec716cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const applyConfig = (config) => {
// - token has no expiration
// - token is expired
console.log(jwtDecode(token));
console.log("espressione: ", (jwtDecode(token).sub !== user || !jwtDecode(token).exp || jwtDecode(token).exp < Date.now() / 1000));
if (user && jwtDecode(token).sub !== user) {
return res.redirect(`${settings.loginUrl}?came_from=${req.url}`);
}
Expand Down

0 comments on commit ec716cd

Please sign in to comment.