Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/isJWT.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function isJWT(str) {
const dotSplit = str.split('.');
const len = dotSplit.length;

if (len > 3 || len < 2) {
if (len !== 3) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adding reference link eg. https://jwt.io/introduction

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Chrislemus! for your valuable feedback.

return false;
}

Expand Down