Skip to content

Commit

Permalink
Revert "test: different searchParams method"
Browse files Browse the repository at this point in the history
This reverts commit c2b6924.
  • Loading branch information
丈槍由紀 committed Nov 18, 2023
1 parent 65f2b9a commit 39bcb8e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/frontend/src/pages/auth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ function accepted() {
state = "fetch-session-error";
throw new Error("Callback URI doesn't match registered app");
}
const test = new URLSearchParams(window.location.search);
const callbackUrl = session.app.callbackUrl.includes('elk.zone') ? new URL(session.app.callbackUrl) : session.app.callbackUrl.includes('wordpress.com') ? new URL(test.get('redirect_uri') as string) : 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();
Expand Down

0 comments on commit 39bcb8e

Please sign in to comment.