From 2e7e1c2aaa8ae69a88de026ba6f13c16bc835e74 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Fri, 13 Sep 2019 22:14:40 -0400 Subject: nfsw/auth.py: Add 'logout' route. --- nfsw/auth.py | 7 +++++++ 1 file changed, 7 insertions(+) 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')) + + -- cgit v1.2.3