From c59715381e38de19785f0912c91f8b03e0549195 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Sun, 20 Feb 2022 03:30:27 +0100 Subject: [PATCH] Configure base_controller of Doorkeeper --- config/initializers/doorkeeper.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index 958b9e9a..83293820 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -2,6 +2,8 @@ Doorkeeper.configure do # Change the ORM that doorkeeper will use (needs plugins) orm :active_record + base_controller 'ApplicationController' + # This block will be called to check whether the resource owner is authenticated or not. resource_owner_authenticator do authenticate @@ -111,10 +113,3 @@ Doorkeeper.configure do # WWW-Authenticate Realm (default "Doorkeeper"). realm 'Foodsoft' end - -# my take on https://github.com/doorkeeper-gem/doorkeeper/issues/465 -ActiveSupport.on_load(:after_initialize) do - Doorkeeper::ApplicationController.send :include, Concerns::Locale - Doorkeeper::ApplicationController.send :include, Concerns::FoodcoopScope - Doorkeeper::ApplicationController.send :include, Concerns::Auth -end