From 8557a8e5882521dfd6eaa3089855994a2af5d028 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 25 Sep 2023 05:37:41 +0200 Subject: [PATCH] test: elk.zone callback --- packages/frontend/src/pages/auth.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/auth.vue b/packages/frontend/src/pages/auth.vue index 6f10ae167..ac4a2c340 100644 --- a/packages/frontend/src/pages/auth.vue +++ b/packages/frontend/src/pages/auth.vue @@ -77,7 +77,7 @@ function accepted() { state = "fetch-session-error"; throw new Error("Callback URI doesn't match registered app"); } - const callbackUrl = new URL(redirectUri); + const callbackUrl = session.app.callbackUrl.includes('elk.zone') ? new URL(session.app.callbackUrl) : new URL(redirectUri); callbackUrl.searchParams.append("code", session.token); if (getUrlParams().state) callbackUrl.searchParams.append("state", getUrlParams().state); location.href = callbackUrl.toString();