Ruby on rails 设计令牌身份验证api身份验证

Ruby on rails 设计令牌身份验证api身份验证,ruby-on-rails,api,authentication,Ruby On Rails,Api,Authentication,我正在使用Desive_token_auth的 “config.change\u headers\on\u each\u request=true”以重置每个api请求上的验证头。 但是,没有在响应头中返回访问令牌 设计令牌\u auth.rb: DeviseTokenAuth.setup do |config| config.change_headers_on_each_request = true end 应用程序_controller.rb: class ApplicationCon

我正在使用Desive_token_auth的 “
config.change\u headers\on\u each\u request=true
”以重置每个api请求上的验证头。 但是,没有在响应头中返回访问令牌

设计令牌\u auth.rb:

DeviseTokenAuth.setup do |config|
  config.change_headers_on_each_request = true
end
应用程序_controller.rb:

class ApplicationController < ActionController::Base
  protect_from_forgery with: :null_session
  include DeviseTokenAuth::Concerns::SetUserByToken
  before_action :authenticate_user!
end
我在其他API的请求头中传递了所有这些参数,但响应并没有包含所有这些参数

使用:

gem 'devise_token_auth', git: 'https://github.com/jasonswett/devise_token_auth.git'
我建议使用
gem 'devise_token_auth', git: 'https://github.com/jasonswett/devise_token_auth.git'