sign in user when token is fetched #70

Closed
bilal.catic wants to merge 3 commits from API-can-fetch-user-session-cookie into master
2 changed files with 11 additions and 0 deletions
Showing only changes of commit 69d4ef0fb2 - Show all commits

View File

@@ -1,3 +1,7 @@
# frozen_string_literal: true
require './lib/knock_monkeypatch'
class Api::UserTokenController < Knock::AuthTokenController
include Oath::ControllerHelpers

7
lib/knock_monkeypatch.rb Normal file
View File

@@ -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