summaryrefslogtreecommitdiffstats
path: root/nfsw/auth.py
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2019-09-13 22:14:40 -0400
committerrsiddharth <s@ricketyspace.net>2019-09-13 22:14:40 -0400
commit2e7e1c2aaa8ae69a88de026ba6f13c16bc835e74 (patch)
treeb44d58285b70b6046ec20140830e0a61accc655e /nfsw/auth.py
parent961af44392dde72133a228133ad483cbbc0386a0 (diff)
nfsw/auth.py: Add 'logout' route.
Diffstat (limited to 'nfsw/auth.py')
-rw-r--r--nfsw/auth.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/nfsw/auth.py b/nfsw/auth.py
index 08a2a26..654f6c2 100644
--- a/nfsw/auth.py
+++ b/nfsw/auth.py
@@ -158,3 +158,10 @@ def sorry():
return render_template('sorry.html')
+@bp.route('/logout')
+@login_required
+def logout():
+ session.clear()
+ return redirect(url_for('index'))
+
+