You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am using devise_token_auth and ng-token-auth. I want to authenticate REST apis using different access-token for each api.
For that, i'v set config.change_headers_on_each_request to true in devise_token_auth.rb.
Devise_token_auth.rb:
DeviseTokenAuth.setup do |config|
config.change_headers_on_each_request = true
end
Application_controller.rb:
class ApplicationController < ActionController::Base
protect_from_forgery with: :null_session
include DeviseTokenAuth::Concerns::SetUserByToken
before_action :authenticate_user!
end
In an effort to cleanup this project and prioritize a bit, we're marking issues that haven't had any activity in a while with a "close-in-7-days" label. If we don't hear from you in about a week, we'll be closing this issue. Obviously feel free to re-open it at any time if it's the right time or this was done in error!
If you are still having the issue (especially if it's a bug report) please refer to our new Issue Template to provide some more details to help us solve it.
Hi @lynndylanhurley,
i am using devise_token_auth and ng-token-auth. I want to authenticate REST apis using different access-token for each api.
For that, i'v set config.change_headers_on_each_request to true in devise_token_auth.rb.
Devise_token_auth.rb:
DeviseTokenAuth.setup do |config|
config.change_headers_on_each_request = true
end
Application_controller.rb:
class ApplicationController < ActionController::Base
protect_from_forgery with: :null_session
include DeviseTokenAuth::Concerns::SetUserByToken
before_action :authenticate_user!
end
Sign in api's response headers include:
access-token: xxxxx
token-type: xxxx
client: xxxxx
expiry: xxxxx
uid: xxxxx
In an angular service, fetching auth headers using:
$auth.retrieveData('auth_headers')
I passed all these parameters in request headers in other apis, but response doesn't include all these parameters.
Using:
gem 'devise_token_auth', git: 'https://github.com/jasonswett/devise_token_auth.git'
The text was updated successfully, but these errors were encountered: