Skip to content

Commit

Permalink
Restore behavious in create_authorization_response call which previou…
Browse files Browse the repository at this point in the history
…sly accepted a OAuth2Request object as-is (#558)
  • Loading branch information
TurnrDev committed Jun 28, 2023
1 parent 234226f commit e228702
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion authlib/oauth2/rfc6749/authorization_server.py
Expand Up @@ -246,7 +246,9 @@ def create_authorization_response(self, request=None, grant_user=None):
it is None.
:returns: Response
"""
request = self.create_oauth2_request(request)
if not isinstance(request, OAuth2Request):
request = self.create_oauth2_request(request)

try:
grant = self.get_authorization_grant(request)
except UnsupportedResponseTypeError as error:
Expand Down

0 comments on commit e228702

Please sign in to comment.