-
Notifications
You must be signed in to change notification settings - Fork 126
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
verifyFunc() callback credentials
arg isn't optional as expected
#187
Comments
@jmm well spotted! this is a Documentation issue. credentials are indeed required for |
Thanks @nelsonic! Ok, I see. My 2 cents is that I don't feel very strongly either way about credentials being required or optional for either On one hand, omitting it is a very small convenience in either case. On the other hand, I don't see a problem with allowing it to be optional on So it's up to you. If you think it should be optional for |
Yeah, I think my preference would be |
…callback. 100% backward compatible. fixes #187 - as documented already
The
credentials
arg to theverifyFunc()
callback is documented as optional like forvalidateFunc()
, but it's not actually. Here's a branch with that arg deleted from the relevant test code, causing failures.The internal code for
verifyFunc()
doesn't default to the already decoded credentials likevalidateFunc()
does:credentials || decoded
.Most of the work to fix this is in refactoring the test code to test both scenarios.
The text was updated successfully, but these errors were encountered: