[doorkeeper] Attempt to fix oauth connect issues.

This commit is contained in:
Fosco Marotto 2021-01-23 16:33:48 -05:00
parent 8d09044ee4
commit 63ad3a1590
2 changed files with 6 additions and 4 deletions

View File

@ -94,7 +94,6 @@ class Api::BaseController < ApplicationController
end end
def authorize_if_got_token!(*scopes) def authorize_if_got_token!(*scopes)
Doorkeeper::AccessToken.connection.stick_to_master!
doorkeeper_authorize!(*scopes) if doorkeeper_token doorkeeper_authorize!(*scopes) if doorkeeper_token
end end

View File

@ -16,6 +16,9 @@ Rails.application.routes.draw do
mount PgHero::Engine, at: 'pghero', as: :pghero mount PgHero::Engine, at: 'pghero', as: :pghero
end end
Doorkeeper::AccessToken.connection.stick_to_master!
Doorkeeper::AccessGrant.connection.stick_to_master!
use_doorkeeper do use_doorkeeper do
controllers authorizations: 'oauth/authorizations', controllers authorizations: 'oauth/authorizations',
authorized_applications: 'oauth/authorized_applications', authorized_applications: 'oauth/authorized_applications',
@ -225,9 +228,9 @@ Rails.application.routes.draw do
end end
namespace :chat_conversation_accounts do namespace :chat_conversation_accounts do
# #
end end
resources :chat_conversation_accounts, only: :show do resources :chat_conversation_accounts, only: :show do
member do member do
post :messenger_block_relationships post :messenger_block_relationships
@ -365,7 +368,7 @@ Rails.application.routes.draw do
resource :removed_accounts, only: [:show, :create, :destroy], controller: 'groups/removed_accounts' resource :removed_accounts, only: [:show, :create, :destroy], controller: 'groups/removed_accounts'
resource :password, only: [:create], controller: 'groups/password' resource :password, only: [:create], controller: 'groups/password'
resource :join_requests, only: [:show], controller: 'groups/requests' resource :join_requests, only: [:show], controller: 'groups/requests'
post '/join_requests/respond', to: 'groups/requests#respond_to_request' post '/join_requests/respond', to: 'groups/requests#respond_to_request'
resource :pin, only: [:show, :create], controller: 'groups/pins' resource :pin, only: [:show, :create], controller: 'groups/pins'