diff --git a/lib/wine_bouncer/oauth2.rb b/lib/wine_bouncer/oauth2.rb index b5b2292..c166ed4 100644 --- a/lib/wine_bouncer/oauth2.rb +++ b/lib/wine_bouncer/oauth2.rb @@ -89,7 +89,8 @@ def before context.protected_endpoint = endpoint_protected? return unless context.protected_endpoint? self.doorkeeper_request = env # set request for later use. - doorkeeper_authorize!(*auth_scopes) + scopes = auth_scopes + doorkeeper_authorize!(*scopes) unless scopes.include? :false context.doorkeeper_access_token = doorkeeper_token end