waiting-for-dev/devise-jwt

Error when generate jwt_blacklist model in rails 5.2.4 !

seifoueddine opened this issue · 3 comments

I want to create an API rails application and adding authentication using DEVISE and JWT

I'm using :
Windows 8.1
ruby 2.6.5p114
rails 5.2.4
devise-jwt (0.5.9)
devise 4.7.1

When I want to create the model for JWT using this command

`rails g model Jwt_blacklist jti:string:index exp:datetime`

I have this error

C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/warden-jwt_auth-0.3.6/lib/warden/jwt_auth.rb:89:in upcase_first_items': undefined method map' for nil:NilClass (NoMethodError)

any solutions?

Duplicated of #159

For now, you can fix it by locking dry-configurable gem version to 0.9 in your Gemfile

I relay make dry-configurable gem in 0.9 version but I still have the problem!

As it's taking longer than expected to be fixed upstream in dry-configurable, I have released a new version of warden-jwt_auth 0.4.2 which locks itself dry-configurable version. This way, once it's updated there I'll just release a new version and it'll be transparent for the user.

So, to fix it when using devise-jwt, just run bundle update --source warden-jwt_auth