-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allowing authenticating using headers as well as a post request
- Loading branch information
1 parent
b675af8
commit 5243f1a
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi, I don't know if this is the correct place to put this comment or not, but I'm having an issue in this line due to the next reason. Here, my values are the next:
[1] pry(#DeviseTokenAuth::SessionsController)> devise_parameter_sanitizer.instance_values['permitted']
{
:sign_in => #Proc:0x007f0eabb845a0@app/controllers/application_controller.rb:18,
:sign_up => #Proc:0x007f0eabb845c8@/app/controllers/application_controller.rb:10,
:account_update => [
[0] :email,
[1] :password,
[2] :password_confirmation,
[3] :current_password
]
}
:sign_in and :sign_up both are Proc objects that lack "each" method, and that is firing me the next error:
NoMethodError - undefined method
each' for #<Proc:0x007f0ea8951ec0>: () home/vagrant/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/devise_token_auth-bc047473ba7c/app/controllers/devise_token_auth/application_controller.rb:21:in
params_for_resource'() home/vagrant/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/devise_token_auth-bc047473ba7c/app/controllers/devise_token_auth/sessions_controller.rb:144:in
resource_params' () home/vagrant/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/devise_token_auth-bc047473ba7c/app/controllers/devise_token_auth/sessions_controller.rb:13:in
create'Here is how my application_controller is defined:
before_action :configure_permitted_parameters, if: :devise_controller?
protected
def configure_permitted_parameters
devise_parameter_sanitizer.permit(:sign_up) do |user_params|
user_params.permit(:email, :password, :password_confirmation)
end
devise_parameter_sanitizer.permit(:sign_in) do |user_params|
user_params.permit(:email, :password, :session)
end
end
I don't know if I'm missing something, or doing something wrong to get those values as Proc objects.
Thanks