dock: sign out ends the Authentik login too, then returns to the dock

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 15:37:00 -05:00
parent d44546ef29
commit 07a05788ad

View File

@@ -212,7 +212,9 @@ $("signout").onclick = async e => {
// Authentik's sign-out redirects to the site root (copyparty); do it in the background, then reload the dock, // Authentik's sign-out redirects to the site root (copyparty); do it in the background, then reload the dock,
// which sends us through the Discord login and back here. // which sends us through the Discord login and back here.
try { await fetch("/outpost.goauthentik.io/sign_out", {credentials:"same-origin", mode:"no-cors", redirect:"follow"}); } catch(e){} try { await fetch("/outpost.goauthentik.io/sign_out", {credentials:"same-origin", mode:"no-cors", redirect:"follow"}); } catch(e){}
setTimeout(() => location.replace("/dock/"), 500); // also end the Authentik login itself (otherwise the next visit re-authorises silently); the flow returns to this host
const auth = "https://" + location.hostname.replace(/^[^.]+\./, "auth.") + "/if/flow/default-invalidation-flow/?next=" + encodeURIComponent(location.origin + "/dock/");
setTimeout(() => location.replace(auth), 400);
}; };
whoami(); renderPreview(); whoami(); renderPreview();
</script> </script>