aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask/oauth2/routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/wqflask/oauth2/routes.py')
-rw-r--r--wqflask/wqflask/oauth2/routes.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/wqflask/wqflask/oauth2/routes.py b/wqflask/wqflask/oauth2/routes.py
index 931b8b61..a72501c4 100644
--- a/wqflask/wqflask/oauth2/routes.py
+++ b/wqflask/wqflask/oauth2/routes.py
@@ -9,11 +9,9 @@ from flask import (
flash, request, session, redirect, Blueprint, render_template,
current_app as app)
-oauth2 = Blueprint("oauth2", __name__)
+from .checks import require_oauth2, user_logged_in
-def user_logged_in():
- """Check whether the user has logged in."""
- return bool(session.get("oauth2_token", False))
+oauth2 = Blueprint("oauth2", __name__)
@oauth2.route("/login", methods=["GET", "POST"])
def login():