Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError when token is not a string #304

Closed
ricardogama opened this issue Feb 1, 2017 · 0 comments
Closed

TypeError when token is not a string #304

ricardogama opened this issue Feb 1, 2017 · 0 comments

Comments

@ricardogama
Copy link
Contributor

I started getting uncaught exceptions when receiving tokens that are not strings:

TypeError: jwtString.split is not a function

Since I'm only handling errors exposed by this library I expected a JsonWebTokenError to be thrown when verifying a value other than string.

I saw some issues related to this error but the focus was on throwing or return it on the callback. This way I suggest to test the type of the token before splitting it and throw a JsonWebTokenError if not a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant