From b295624bcb6109bc2ca252f94dfe658e395e2c59 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 5 Mar 2024 08:09:49 +0300 Subject: Fix missed bug: Don't use `gn2.utility.tools` for configs. --- gn2/wqflask/oauth2/checks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gn2') diff --git a/gn2/wqflask/oauth2/checks.py b/gn2/wqflask/oauth2/checks.py index 5d90f986..1d355ed8 100644 --- a/gn2/wqflask/oauth2/checks.py +++ b/gn2/wqflask/oauth2/checks.py @@ -7,6 +7,7 @@ from flask import ( flash, request, url_for, redirect, current_app, session as flask_session) from . import session +from .client import authserver_uri, oauth2_clientid, oauth2_clientsecret def user_logged_in(): """Check whether the user has logged in.""" @@ -32,10 +33,8 @@ def require_oauth2(func): return redirect("/") def __with_token__(token): - from gn2.utility.tools import ( - AUTH_SERVER_URL, OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET) client = OAuth2Session( - OAUTH2_CLIENT_ID, OAUTH2_CLIENT_SECRET, token=token) + oauth2_clientid(), oauth2_clientsecret(), token=token) resp = client.get( urljoin(AUTH_SERVER_URL, "auth/user/")) user_details = resp.json() -- cgit v1.2.3