From 3e6e33df3597045a2eef34a25192a61168eef555 Mon Sep 17 00:00:00 2001 From: marstall Date: Fri, 14 Jul 2023 11:13:45 -0400 Subject: [PATCH] redirect to /login after account delete to prevent recreation of sso account (#22575) * redirect to /login after account delete to prevent recreation of sso account * after delete, redirect to /login if siteSettings.login_required --- app/assets/javascripts/discourse/app/lib/logout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/app/lib/logout.js b/app/assets/javascripts/discourse/app/lib/logout.js index 637d85764db..a2018e4ce45 100644 --- a/app/assets/javascripts/discourse/app/lib/logout.js +++ b/app/assets/javascripts/discourse/app/lib/logout.js @@ -11,6 +11,6 @@ export default function logout({ redirect } = {}) { window.location.href = redirect; return; } - - window.location.href = getURL("/"); + const url = ctx.siteSettings.login_required ? "/login" : "/"; + window.location.href = getURL(url); }