Skip to content

Commit

Permalink
Merge pull request #592 from andersnauman/fix/flask-request-args
Browse files Browse the repository at this point in the history
Make sure 'code' returns None instead of crashing if key is missing.
  • Loading branch information
lepture authored Apr 8, 2024
2 parents 5424190 + a627110 commit 610622e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions authlib/integrations/flask_client/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ def authorize_access_token(self, **kwargs):
raise OAuthError(error=error, description=description)

params = {
'code': request.args['code'],
'code': request.args.get('code'),
'state': request.args.get('state'),
}
else:
params = {
'code': request.form['code'],
'code': request.form.get('code'),
'state': request.form.get('state'),
}

Expand Down

0 comments on commit 610622e

Please sign in to comment.