Make view cancel button work with new $local redirect_uri

This commit is contained in:
Fabian Stamm 2019-10-12 20:00:26 +02:00
parent 1cb0873ce8
commit f604f4f13d

View File

@ -7,6 +7,9 @@ function submit() {
document.getElementById("cancel").onclick = () => { document.getElementById("cancel").onclick = () => {
let u = new URL(window.location); let u = new URL(window.location);
let uri = u.searchParams.get("redirect_uri"); let uri = u.searchParams.get("redirect_uri");
if (uri === "$local") {
uri = "/code";
}
window.location.href = uri + "?error=access_denied&state=" + u.searchParams.get("state"); window.location.href = uri + "?error=access_denied&state=" + u.searchParams.get("state");
} }