From f604f4f13dbcf0e68fdd825c6c587ff942708540 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Sat, 12 Oct 2019 20:00:26 +0200 Subject: [PATCH] Make view cancel button work with new $local redirect_uri --- views/src/authorize/authorize.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/views/src/authorize/authorize.js b/views/src/authorize/authorize.js index 8c6ccb2..248682c 100644 --- a/views/src/authorize/authorize.js +++ b/views/src/authorize/authorize.js @@ -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() -} +} \ No newline at end of file