I have a rails 5.2.1 API-mode application and whenever I send a POST request to get a new JWT token I'm receiving a Can't verify CSRF token authenticity. error, which doesn't make sense since the CSRF token validation is disabled in a API mode.
here's my user_token_controller.rb
class UserTokenController < Knock::AuthTokenController
end
here's my application_controller.rb
class ApplicationController < ActionController::API
include Knock::Authenticable
end
here's my config/initialiazers/knock.rb
Knock.setup do |config|
Rails.application.secrets.auth0_client_secret }
end
I have a rails 5.2.1 API-mode application and whenever I send a POST request to get a new JWT token I'm receiving a
Can't verify CSRF token authenticity.
error, which doesn't make sense since the CSRF token validation is disabled in a API mode.here's my
user_token_controller.rb
here's my
application_controller.rb
here's my
config/initialiazers/knock.rb
Here's the error trace
I think that the error could be because the
Knock::ApplicationController
is inherited fromActionController::Base
https://github.com/nsarno/knock/blob/master/app/controllers/knock/application_controller.rb#L2 and not fromActionController::API
but I'm not Rails expert, so I'm not sure about it