lynndylanhurley / devise_token_auth

Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.
Do What The F*ck You Want To Public License
3.55k stars 1.14k forks source link

Not working in Rails 6.1 with Ruby 3.0 #1460

Open frobert opened 3 years ago

frobert commented 3 years ago

Bundler could not find compatible versions for gem "rails": In Gemfile:

rails (~> 6.1)
devise_token_auth (~> 1.1.4) was resolved to 1.1.4, which depends on
  rails (>= 4.2.0, < 6.1)
croatech commented 3 years ago

You can fix it by using: gem 'devise_token_auth', github: 'lynndylanhurley/devise_token_auth'

dirkjonker commented 3 years ago

Not a great solution though if you depend on gems. Are there any plans to publish the new version of the gem?

mhenrixon commented 3 years ago

Can't do that because I don't have git installed in my docker containers and I am not about to install it either :)

Can we have a new release? Obviously, master is working (this I already confirmed). Come on maintainers, cut us a new version!

mhenrixon commented 3 years ago

@pnghai @luisalima @enomotodev @melnik0v @theblang @croatech @dirkjonker who's in charge of this project? Who can cut a new release? I verified it is working on rails 6.1 but I can't install git repositories in our docker containers.

KiwiKilian commented 3 years ago

@mhenrixon there is a v1.1.5 which works fine for me (rails v6.1.3.1, ruby v3.0.1). See here it was committed just before release: https://github.com/lynndylanhurley/devise_token_auth/compare/v1.1.4...v1.1.5

In my Gemfile it's just:

gem 'devise_token_auth', '~> 1.1'

No git required.

mhenrixon commented 3 years ago

@KiwiKilian I am on version 1.1.5 and I get errors on connection_config being used instead of connection_db_config.

image
KiwiKilian commented 3 years ago

@mhenrixon which rails version are you on? See here: https://github.com/lynndylanhurley/devise_token_auth/commit/5b2ef6c2d394894d10ffd87a85b633570ee6c4c8

Rails 6.1 generates a deprecation warning since connection_config will be removed from Rails 6.2.

Herz3h commented 2 months ago

Different issue here, rails 6.1 and ruby 3.0.0:

devise_token_auth: 1.2.2

FrozenError (can't modify frozen Hash: {"Location"=>"http://192.168.3.56:3000/", "Content-Type"=>"application/json; charset=utf-8", "Cache-Control"=>"no-cache"}):
.rvm/gems/ruby-3.0.0/gems/devise_token_auth-1.2.2/app/controllers/devise_token_auth/concerns/set_user_by_token.rb:117:in `update_auth_header'

Is no one encountering this issue after upgrading from ruby 2.7.x to 3.0.0 ??