diff options
author | rsiddharth <s@ricketyspace.net> | 2019-09-13 22:14:40 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2019-09-13 22:14:40 -0400 |
commit | 2e7e1c2aaa8ae69a88de026ba6f13c16bc835e74 (patch) | |
tree | b44d58285b70b6046ec20140830e0a61accc655e | |
parent | 961af44392dde72133a228133ad483cbbc0386a0 (diff) |
nfsw/auth.py: Add 'logout' route.
-rw-r--r-- | nfsw/auth.py | 7 |
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')) + + |