diff --git a/app/controllers/api/user_token_controller.rb b/app/controllers/api/user_token_controller.rb index 401127f..cae81f9 100644 --- a/app/controllers/api/user_token_controller.rb +++ b/app/controllers/api/user_token_controller.rb @@ -1,3 +1,7 @@ +# frozen_string_literal: true + +require './lib/knock_monkeypatch' + class Api::UserTokenController < Knock::AuthTokenController include Oath::ControllerHelpers diff --git a/lib/knock_monkeypatch.rb b/lib/knock_monkeypatch.rb new file mode 100644 index 0000000..ade5f2c --- /dev/null +++ b/lib/knock_monkeypatch.rb @@ -0,0 +1,7 @@ +module Knock + class AuthTokenController < ApplicationController + skip_before_action :authenticate + alias authenticate_with_token authenticate + before_action :authenticate_with_token + end +end \ No newline at end of file