Skip to content

Commit

Permalink
Logout when token expired
Browse files Browse the repository at this point in the history
Updated based on comments in this issue paulvanbladel#121
  • Loading branch information
seagullmouse authored Nov 30, 2017
1 parent b17906f commit 4ba9602
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dist/amd/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ define(['exports', 'aurelia-dependency-injection', './base-config', './storage',

if (exp) {
return Math.round(new Date().getTime() / 1000) <= exp;
} else {
this.logout();
return false;
}

return true;
Expand Down Expand Up @@ -194,4 +197,4 @@ define(['exports', 'aurelia-dependency-injection', './base-config', './storage',

return Authentication;
}()) || _class);
});
});

0 comments on commit 4ba9602

Please sign in to comment.