2020-05-22 14:14:52 +00:00
|
|
|
from flask import redirect, url_for, flash, make_response
|
2019-07-01 15:18:12 +00:00
|
|
|
from flask_login import logout_user
|
|
|
|
|
|
|
|
from app.auth.base import auth_bp
|
|
|
|
|
|
|
|
|
|
|
|
@auth_bp.route("/logout")
|
|
|
|
def logout():
|
|
|
|
logout_user()
|
2020-04-27 20:56:44 +00:00
|
|
|
flash("You are logged out", "success")
|
2020-05-22 14:14:52 +00:00
|
|
|
response = make_response(redirect(url_for("auth.login")))
|
|
|
|
response.delete_cookie("slapp")
|
|
|
|
response.delete_cookie("mfa")
|
|
|
|
response.delete_cookie("dark-mode")
|
|
|
|
|
|
|
|
return response
|