Я использую gem devise_auth_token для аутентификаци. При попытке войти в систему выдает ошибку 401 Unauthorized
Started POST "/auth/sign_in" for 10.12.4.5 at 2018-06-01 11:37:48 +0500
Processing by DeviseTokenAuth::SessionsController#create as JSON
Parameters: {"password"=>"[FILTERED]", "session"=>{"password"=>"[FILTERED]"}}
Unpermitted parameter: :session
Completed 401 Unauthorized in 26ms (Views: 0.7ms | ActiveRecord: 0.0ms)
application_controller.rb:
class ApplicationController < ActionController::API
include DeviseTokenAuth::Concerns::SetUserByToken
before_action :configure_permitted_parameters, if: :devise_controller?
protected
def configure_permitted_parameters
devise_parameter_sanitizer.permit(:sign_up, keys: [:login, :email, :password, :password_confirmation])
devise_parameter_sanitizer.permit(:sign_in, keys: [:login, :password])
devise_parameter_sanitizer.permit(:account_update, keys: [:password, :password_confirmation, :current_password])
end
end
routes.rb:
Rails.application.routes.draw do
mount_devise_token_auth_for 'User', at: 'auth'
end