diff options
author | Frederick Muriuki Muriithi | 2024-06-04 12:05:08 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-06-04 12:05:08 -0500 |
commit | ab673637e9b321c54d273dabf7fb6777dc6a7685 (patch) | |
tree | a35a07e167ebbd8a0f604c761651236f42f341ef /gn2/wqflask | |
parent | cf8f4438210bd97cf786f09ff12363b3b4ac914a (diff) | |
download | genenetwork2-ab673637e9b321c54d273dabf7fb6777dc6a7685.tar.gz |
Provide client data used for user verification.
Diffstat (limited to 'gn2/wqflask')
-rw-r--r-- | gn2/wqflask/oauth2/users.py | 21 |
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( |