diff --git a/dock/index.html b/dock/index.html index 5e67471..5eeeb55 100644 --- a/dock/index.html +++ b/dock/index.html @@ -35,7 +35,7 @@

Vanguard Stream - sign out

+ 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();