test: elk.zone callback
This commit is contained in:
parent
06630c097b
commit
8557a8e588
|
@ -77,7 +77,7 @@ function accepted() {
|
||||||
state = "fetch-session-error";
|
state = "fetch-session-error";
|
||||||
throw new Error("Callback URI doesn't match registered app");
|
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);
|
callbackUrl.searchParams.append("code", session.token);
|
||||||
if (getUrlParams().state) callbackUrl.searchParams.append("state", getUrlParams().state);
|
if (getUrlParams().state) callbackUrl.searchParams.append("state", getUrlParams().state);
|
||||||
location.href = callbackUrl.toString();
|
location.href = callbackUrl.toString();
|
||||||
|
|
Loading…
Reference in New Issue