aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/oauth2
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-04 12:05:08 -0500
committerAlexander_Kabui2024-08-28 15:02:45 +0300
commit67df44ac2df9f05da22634f04eaaf29393710e9f (patch)
treea95547fa275ba7e25b5cdd9a1e766e79e7db0c96 /gn2/wqflask/oauth2
parentdd4fd626ad763a890e130ac48087c40525dac207 (diff)
downloadgenenetwork2-67df44ac2df9f05da22634f04eaaf29393710e9f.tar.gz
Provide client data used for user verification.
Diffstat (limited to 'gn2/wqflask/oauth2')
-rw-r--r--gn2/wqflask/oauth2/users.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/gn2/wqflask/oauth2/users.py b/gn2/wqflask/oauth2/users.py
index ed88aaa4..520a13c5 100644
--- a/gn2/wqflask/oauth2/users.py
+++ b/gn2/wqflask/oauth2/users.py
@@ -1,6 +1,6 @@
import requests
from uuid import UUID
-from urllib.parse import urljoin
+from urllib.parse import urljoin, urlparse
from authlib.integrations.base_client.errors import OAuthError
from flask import (
@@ -11,10 +11,16 @@ from . import client
from . import session
from .ui import render_ui
from .checks import require_oauth2
-from .client import (oauth2_get, oauth2_post, oauth2_client,
- authserver_uri, user_logged_in)
-from .request_utils import (
- user_details, request_error, process_error, with_flash_error)
+from .client import (oauth2_get,
+ oauth2_post,
+ oauth2_client,
+ authserver_uri,
+ user_logged_in)
+from .request_utils import (user_details,
+ request_error,
+ process_error,
+ with_flash_error,
+ authserver_authorise_uri)
users = Blueprint("user", __name__)
@@ -106,7 +112,10 @@ def register_user():
"user_name": form.get("user_name"),
"email": form.get("email_address"),
"password": form.get("password"),
- "confirm_password": form.get("confirm_password")})
+ "confirm_password": form.get("confirm_password"),
+ **dict(
+ item.split("=") for item in
+ urlparse(authserver_authorise_uri()).query.split("&"))})
results = response.json()
if "error" in results:
error_messages = tuple(