diff --git a/lenticular_cloud/app.py b/lenticular_cloud/app.py index 54eeb0b..bdae7a5 100644 --- a/lenticular_cloud/app.py +++ b/lenticular_cloud/app.py @@ -51,7 +51,7 @@ def init_app(name=None): #init hydra admin api hydra_config = hydra.Configuration( - app.config['HYDRA_ADMIN_URL'], + host=app.config['HYDRA_ADMIN_URL'], username=app.config['HYDRA_ADMIN_USER'], password=app.config['HYDRA_ADMIN_PASSWORD']) hydra_client = hydra.ApiClient(hydra_config) diff --git a/lenticular_cloud/views/auth.py b/lenticular_cloud/views/auth.py index 1d5896d..3340e41 100644 --- a/lenticular_cloud/views/auth.py +++ b/lenticular_cloud/views/auth.py @@ -40,11 +40,11 @@ def consent(): consent_request = current_app.hydra_api.get_consent_request( request.args['consent_challenge']) except ory_hydra_client.exceptions.ApiValueError: - logger.info(f' ory exception {e}') - #return redirect(url_for('frontend.index')) - except ory_hydra_client.exceptions.ApiException as e: - logger.fatal(f'ory exception {e}',e) - raise e + logger.info('ory exception - could not fetch user data ApiValueError') + return redirect(url_for('frontend.index')) + except ory_hydra_client.exceptions.ApiException: + logger.exception('ory exception - could not fetch user data') + return redirect(url_for('frontend.index')) requested_scope = consent_request.requested_scope requested_audiences = consent_request.requested_access_token_audience