diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/oauth2/toplevel.py | 6 | ||||
-rw-r--r-- | wqflask/wqflask/templates/oauth2/group_join_or_create.html | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/wqflask/wqflask/oauth2/toplevel.py b/wqflask/wqflask/oauth2/toplevel.py index a998909c..68ddac13 100644 --- a/wqflask/wqflask/oauth2/toplevel.py +++ b/wqflask/wqflask/oauth2/toplevel.py @@ -47,9 +47,7 @@ def logout(): if user_logged_in(): token = session.get("oauth2_token", False) config = app.config - client = OAuth2Session( - config["OAUTH2_CLIENT_ID"], config["OAUTH2_CLIENT_SECRET"], - scope = SCOPE, token=token) + client = oauth2_client() resp = client.revoke_token(urljoin(config["GN_SERVER_URL"], "oauth2/revoke")) keys = tuple(key for key in session.keys() if not key.startswith("_")) for key in keys: @@ -60,7 +58,7 @@ def logout(): @toplevel.route("/register-user", methods=["GET", "POST"]) def register_user(): if user_logged_in(): - next_endpoint=request.args.get("next", url_for("/")) + next_endpoint=request.args.get("next", "/") flash(("You cannot register a new user while logged in. " "Please logout to register a new user."), "alert-danger") diff --git a/wqflask/wqflask/templates/oauth2/group_join_or_create.html b/wqflask/wqflask/templates/oauth2/group_join_or_create.html index d0a10e1b..0ec5674b 100644 --- a/wqflask/wqflask/templates/oauth2/group_join_or_create.html +++ b/wqflask/wqflask/templates/oauth2/group_join_or_create.html @@ -22,7 +22,7 @@ <p>You can only be a member of a single group.</p> </div> - <form action="{{url_for('oauth2.request_add_to_group')}}" + <form action="{{url_for('oauth2.user.request_add_to_group')}}" method="POST"> <legend>Request to be added to group</legend> <div class="form-group"> @@ -56,7 +56,7 @@ <p>You can only be a member of a single group.</p> </div> - <form action="{{url_for('oauth2.create_group')}}" + <form action="{{url_for('oauth2.group.create_group')}}" method="POST"> <legend>Create a new group</legend> <div class="form-group mytooltip"> |