Skip to content

Commit

Permalink
(feat)Implemented a new feature in the : function to check the expira…
Browse files Browse the repository at this point in the history
…tion time of JWTs
  • Loading branch information
P-1000 committed Oct 7, 2023
1 parent d7043b8 commit 75e36d4
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/lib/isJWTExpiration.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export default function isJWTExpiration(token) {
if (!token || typeof token !== 'string') {
return false;

Check warning on line 3 in src/lib/isJWTExpiration.js

View check run for this annotation

Codecov / codecov/patch

src/lib/isJWTExpiration.js#L3

Added line #L3 was not covered by tests
}

try {
const payload = JSON.parse(atob(token.split('.')[1]));

Check warning on line 6 in src/lib/isJWTExpiration.js

View check run for this annotation

Codecov / codecov/patch

src/lib/isJWTExpiration.js#L5-L6

Added lines #L5 - L6 were not covered by tests

Expand Down

0 comments on commit 75e36d4

Please sign in to comment.