X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6c6e8883f703efe8e05d893a94c169ac90733d42..dd1f9970332aee66e9e06b284407b1b57119fc5d:/config/initializers/doorkeeper.rb diff --git a/config/initializers/doorkeeper.rb b/config/initializers/doorkeeper.rb index 32156b821..a96e6fd6c 100644 --- a/config/initializers/doorkeeper.rb +++ b/config/initializers/doorkeeper.rb @@ -419,10 +419,10 @@ Doorkeeper.configure do # Under some circumstances you might want to have applications auto-approved, # so that the user skips the authorization step. # For example if dealing with a trusted application. - # - # skip_authorization do |resource_owner, client| - # client.superapp? or resource_owner.admin? - # end + + skip_authorization do |_, client| + client.scopes.include?("skip_authorization") + end # Configure custom constraints for the Token Introspection request. # By default this configuration option allows to introspect a token by another