diff --git a/authlib/integrations/base_client/base_app.py b/authlib/integrations/base_client/base_app.py index 3df09a10..ee402d36 100644 --- a/authlib/integrations/base_client/base_app.py +++ b/authlib/integrations/base_client/base_app.py @@ -143,10 +143,9 @@ def retrieve_access_token_params(self, request, request_token=None): params['request_token'] = request_token else: params = self._retrieve_oauth2_access_token_params(request, params) - - redirect_uri = self.framework.get_session_data(request, 'redirect_uri') - if redirect_uri: - params['redirect_uri'] = redirect_uri + redirect_uri = self.framework.get_session_data(request, 'redirect_uri') + if redirect_uri: + params['redirect_uri'] = redirect_uri log.debug('Retrieve temporary data: {!r}'.format(params)) return params