+ sign out
@@ -207,6 +207,13 @@ $("dump").onclick = async () => {
} catch (e) { status("dump failed: " + e.message, "bad"); }
};
+$("signout").onclick = async e => {
+ e.preventDefault(); status("signing out…");
+ // 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.
+ try { await fetch("/outpost.goauthentik.io/sign_out", {credentials:"same-origin", mode:"no-cors", redirect:"follow"}); } catch(e){}
+ setTimeout(() => location.replace("/dock/"), 500);
+};
whoami(); renderPreview();