-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Rails 5 API Mode - no headers in response #606
Comments
Same issue here... Not getting access token in response :( |
Setting: config.enable_standard_devise_support = true worked for me |
Thanks @jpmermoz Setting |
I think the problem is that |
@jpmermoz Hmm, I don't think that's the problem, we're using:
|
@muzykabartek exactly.. i'm using those same versions too. I guess |
Same issue here, although it was working fine with the same setup as @muzykabartek until I ran a bundle update. |
@bobmshannon Just ran
|
@muzykabartek I should clarify that was with What does your |
@muzykabartek @jpmermoz @aaronshim Looks like there is a bug (?) in active_model_serializers Try downgrading to Also see: #600. |
@bobmshannon do you have a working setup now? Struggling to find the precise combination of gems that will enable this to work correctly! |
@tommor Hey Tom -- I do have everything working right now. This is what I am currently using:
It was downgrading active_model_serializers to |
Thanks @bobmshannon - that seems to have it working - turns out on my end the new JavaScript |
I was also having issues with w/ v0.10.0.rc5, though different than described above. Login was creating multiple tokens, always one w/ the hashed client_id, and one with a client_id of 'default'. Downgrading to v.0.10.0.rc4 fixed the issue for me. |
Downgrading |
I tried the above setup but doesnt fix it. I still dont get the access_token back after an api from postman. #Gemfile
gem 'active_model_serializers', '~> 0.10.0.rc4'
gem 'devise_token_auth', '~> 0.1.37'
gem 'devise', '~> 4.0.0' #devise_token_auth.rb
enable_standard_devise_support = true Any help will be highly appreciated. |
worked now :D apparently, my gemfile.lock was getting update with the one not in gemfile (which was rc4). I have to manually add rc4 to it (lock file) and things work. Not sure, why tho... Cheers! |
I also had the same problem (no headers in response) and downgrading 'active_model_serializers' to ' 0.10.0.rc4' fixed the problem. Using enable_standard_devise_support = true was not necessary for me. Current versions:
|
Was this problem solved in current version? |
OK, I figured out that I was expecting the wrong behavior, as mentioned in #851 |
Hi everyone, we're trying to add authentication with
devise_token_auth
to an API we're building. We're usingRails (5.0.0.beta3)
anddevise_token_auth (0.1.37)
.Our routes look like that:
We set CORS with
rack-cors
following your README.md#cors:Then we added
SetUserByToken
concern to theApplicationController
:Also, we set
DeviseTokenAuth.change_headers_on_each_request
tofalse
.Now, we start server with
rails s -b api.example.dev
(we'd set it up in/etc/hosts
).Then when we send
curl
request there is no [access-token
, ..] headers:Is there anything we're doing wrong? How can we fix it?
Thanks in advance!
The text was updated successfully, but these errors were encountered: