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

Fix handling non string tokens #305

Merged

Conversation

ricardogama
Copy link

This PR adds handling of non string tokens, throwing a JsonWebTokenError error with jwt malformed message instead of TypeError.

Closes #304

@ricardogama
Copy link
Author

@jfromaniello any change you can review this?

@ziluvatar
Copy link
Contributor

Hi @ricardogama, I see it ok, can you just change a silly thing? Instead of that error message, we can provide more information, like jwt must be a string or jwt must be a string, but number was found. What do you think?

@ricardogama ricardogama force-pushed the bugfix/handle-non-string-tokens branch from dba85ed to 7e42cf4 Compare February 3, 2017 19:28
@ricardogama
Copy link
Author

@ziluvatar Sure, I think there's no need to be so specific in the message, so I went forward with jwt must be a string. Sounds good?

@ziluvatar ziluvatar merged commit 1b6ec8d into auth0:master Feb 3, 2017
@ziluvatar
Copy link
Contributor

Yes, it is enough, thanks @ricardogama !!

@ricardogama
Copy link
Author

@ziluvatar No problem at all! Can this fix be released?

@ziluvatar
Copy link
Contributor

@ricardogama we released v7.3.0 with this fix on it yesterday :)

@ricardogama
Copy link
Author

@ziluvatar Awesome, thanks!

@ricardogama ricardogama deleted the bugfix/handle-non-string-tokens branch February 14, 2017 10:57
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

Successfully merging this pull request may close these issues.

2 participants