Merge pull request #959 from GSA/fix_404_maybe

maybe fix 404 on signout
This commit is contained in:
Carlo Costino
2023-11-29 14:00:36 -05:00
committed by GitHub
+3 -2
View File
@@ -34,6 +34,7 @@ def sign_out():
if current_user.is_authenticated: if current_user.is_authenticated:
# TODO This doesn't work yet, due to problems above. # TODO This doesn't work yet, due to problems above.
current_user.sign_out() current_user.sign_out()
login_dot_gov_logout_url = os.getenv("LOGIN_DOT_GOV_LOGOUT_URL")
return redirect(os.getenv("LOGIN_DOT_GOV_LOGOUT_URL")) if login_dot_gov_logout_url:
return redirect(login_dot_gov_logout_url)
return redirect(url_for("main.index")) return redirect(url_for("main.index"))