aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authentication
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/authentication')
-rw-r--r--gn_auth/auth/authentication/oauth2/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gn_auth/auth/authentication/oauth2/views.py b/gn_auth/auth/authentication/oauth2/views.py
index fc27768..22437a2 100644
--- a/gn_auth/auth/authentication/oauth2/views.py
+++ b/gn_auth/auth/authentication/oauth2/views.py
@@ -37,9 +37,9 @@ def authorise():
"""Authorise a user"""
try:
server = app.config["OAUTH2_SERVER"]
- client_id = uuid.UUID(request.args.get(
- "client_id",
- request.form.get("client_id", str(uuid.uuid4()))))
+ client_id = uuid.UUID(request.args.get("client_id")
+ or request.form.get("client_id")
+ or str(uuid.uuid4()))
client = server.query_client(client_id)
if not bool(client):
flash("Invalid OAuth2 client.", "alert-danger")