aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/route_manager.py
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-05-20 23:29:17 +0100
committerGravatar GitHub <[email protected]>2018-05-20 23:29:17 +0100
commit449d52caf4010ed112f1928bf6b5234bcfb9a339 (patch)
tree3ce59258a68fcb4174610b157f3a3ae9c50be02a /pysite/route_manager.py
parentTests directory (#73) (diff)
Privacy/Usability updates (#75)
* Use less intrusive oauth scopes, add login redirect method * Remove debugging prints, add missing __init__ * Work towards new privacy policy * Fix judging state icons on code jam management page * Jammer profile retraction and punishments based on jam status * Linting * [Jams] Deny profile saving for users < 13 years, and finish removal page * Fix tests * Clean up and address Volcyy's review * Add proper login redirection to require_roles decorator * Fix template is_staff() and add staff link to navigation * Address lemon's review * Linting * Privacy page formatting * Privacy page formatting
Diffstat (limited to 'pysite/route_manager.py')
-rw-r--r--pysite/route_manager.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pysite/route_manager.py b/pysite/route_manager.py
index eacd74b4..c899cf02 100644
--- a/pysite/route_manager.py
+++ b/pysite/route_manager.py
@@ -13,7 +13,7 @@ from pysite.constants import (
CSRF, DEBUG_MODE, DISCORD_OAUTH_AUTHORIZED, DISCORD_OAUTH_ID, DISCORD_OAUTH_REDIRECT,
DISCORD_OAUTH_SCOPE, DISCORD_OAUTH_SECRET, PREFERRED_URL_SCHEME)
from pysite.database import RethinkDB
-from pysite.oauth import OauthBackend
+from pysite.oauth import OAuthBackend
from pysite.websockets import WS
TEMPLATES_PATH = "../templates"
@@ -51,14 +51,14 @@ class RouteManager:
CSRF.init_app(self.app) # Set up CSRF protection
# Load the oauth blueprint
- self.oauth_backend = OauthBackend(self)
+ self.oauth_backend = OAuthBackend(self)
self.oauth_blueprint = make_discord_blueprint(
DISCORD_OAUTH_ID,
DISCORD_OAUTH_SECRET,
DISCORD_OAUTH_SCOPE,
- '/',
login_url=DISCORD_OAUTH_REDIRECT,
authorized_url=DISCORD_OAUTH_AUTHORIZED,
+ redirect_to="main.auth.done",
backend=self.oauth_backend
)
self.log.debug(f"Loading Blueprint: {self.oauth_blueprint.name}")