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

2.2.1 is no longer raising JWT::DecodeError on nil verification key #328

Closed
jamesstonehill opened this issue Aug 13, 2019 · 0 comments · Fixed by #358
Closed

2.2.1 is no longer raising JWT::DecodeError on nil verification key #328

jamesstonehill opened this issue Aug 13, 2019 · 0 comments · Fixed by #358
Assignees
Labels
Milestone

Comments

@jamesstonehill
Copy link
Contributor

This raises no implicit conversion of nil into String (TypeError)

require "bundler/inline"

gemfile do
  gem "jwt", "2.2.1"
end

token = JWT.encode({}, "foo")

JWT.decode(token, nil, true)

This raises No verification key available (JWT::DecodeError))

require "bundler/inline"

gemfile do
  gem "jwt", "2.1.0"
end

token = JWT.encode({}, "foo")

JWT.decode(token, nil, true)

I'm guessing we still want to be raising the No verification key available (JWT::DecodeError)) key since it's a clearer message.

@excpt excpt added the bug label Sep 16, 2019
@excpt excpt added this to the Version 2.2.2 milestone Sep 16, 2019
@excpt excpt self-assigned this Sep 16, 2019
@excpt excpt closed this as completed in #358 Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants