Fix error displayed for OAuth if an existing token already matches scopes

Before this change, the OAuth system would automatically redirect to display the code if the scopes requested were a subset of those already granted by the user. However, the missing process auth resulted in `get_authenticated_user` returning None, which broke the OAuth flow.

Fixes #2131
This commit is contained in:
Joseph Schorr 2016-11-17 16:21:26 -05:00
parent 97c934a5a2
commit 0e602efbf9

View file

@ -518,6 +518,7 @@ def deny_application():
@param_required('client_id')
@param_required('redirect_uri')
@param_required('scope')
@process_auth_or_cookie
def request_authorization_code():
provider = FlaskAuthorizationProvider()
response_type = request.args.get('response_type', 'code')