providers/oauth2: ensure flow is cleaned up on error
This commit is contained in:
parent
5184c4b7ef
commit
e21ed92848
|
@ -220,9 +220,11 @@ class OAuthFulfillmentStage(StageView):
|
|||
)
|
||||
return redirect(self.create_response_uri())
|
||||
except (ClientIdError, RedirectUriError) as error:
|
||||
self.executor.stage_invalid()
|
||||
# pylint: disable=no-member
|
||||
return bad_request_message(request, error.description, title=error.error)
|
||||
except AuthorizeError as error:
|
||||
self.executor.stage_invalid()
|
||||
uri = error.create_uri(self.params.redirect_uri, self.params.state)
|
||||
return redirect(uri)
|
||||
|
||||
|
|
Reference in a new issue