Open abred opened 8 years ago
Abred,
I have been experiencing a token issue all week. I have found the following works for me.
Use devise 4.1.1
I cannot get the token in the headers with 4.2.0.
Thanks @SmokeStackSteve, downgrading Devise indeed fixes this issue.
I can confirm that this issue still exists with:
devise 4.2.0 devise_token_auth 0.1.39 rails 5.0.1 ruby 2.4.0p0 rack-cors 0.4.0 both puma & webrick servers
I only had to downgrade active_model_serializers.
It works with this versions: devise 4.2.0 devise_token_auth 0.1.40 active_model_serializers 0.10.0.rc4 rails 5.0.1 rack-cors 0.4.0
Tested on puma 3.6.2
I faced the same problem with headers not appearing. I followed the same steps as described by @fbove and downgraded the active model serializer to 0.10.0.rc4. However, when I updated the Gemfile, the Gemfile.lock did not update properly (it failed for specs). In the end, I got it to work by entering the following in my Gemfile:
gem 'rails', '~> 5.0.1'
gem 'active_model_serializers', '>0.9.7', '<0.10.0.rc5'
gem 'devise', '~> 4.0.0'
gem 'devise_token_auth', '~> 0.1.39'
Note: This solution only resolved displaying the headers for a user/admin sign-in (problem still exists with updating token)
Are people still seeing this issue with Devise 4.3.0? I'm seeing an issue where I'm able to successfully make a request, but the response headers are missing all of the expected auth entries.
Hi guys, I meet this issue after installing it without restart rails. Yep, the solution for me is simply to make rails server restart.
hello,
problem seems similar to #721, however I checked and it's working properly up to
auth_header = @resource.create_new_auth_token(@client_id)
(set_user_by_token.rb:118) it contains the token etc, butresponse.headers.merge!(auth_header)
does not merge it into response.headers (response.headers is not modified after merge!)auth_header.each do | k,v| response.set_header(k,v) end
works (although merge! seems to do pretty much the same?)without the extra set_header:
with:
devise-4.2.0 devise_token_auth-0.1.39 Rails 5.0.0.1 ruby 2.3.1p112