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
1 changed files with 4 additions and 1 deletions

View File

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