aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
Diffstat (limited to 'gn2')
-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(