Files
railiance-platform/helm/openbao-ui-overlay/redirect-bootstrap.js
tegwick cb45f29fb2 Fix OpenBao login falling back to token auth
Add synchronous redirect-bootstrap, direct KeyCape OIDC on sign-in, and mount
watching so the UI no longer lands on ?with=token when netkingdom is hidden
from unauthenticated mount listing. Document listing_visibility tune helper.
2026-06-19 21:04:31 +02:00

23 lines
547 B
JavaScript

(function () {
"use strict";
var path = window.location.pathname;
if (path.indexOf("/oidc/") !== -1) {
return;
}
if (!/\/ui\/vault\/auth(?:\/|$)/.test(path) && !/\/ui\/?$/.test(path)) {
return;
}
var params = new URLSearchParams(window.location.search);
var current = (params.get("with") || "").replace(/\/$/, "");
if (current === "netkingdom" || current === "keycape") {
return;
}
params.set("with", "netkingdom/");
window.location.replace(
window.location.pathname + "?" + params.toString()
);
})();