Skip to content

Commit

Permalink
fix(core): selfhost redirect url (#6426)
Browse files Browse the repository at this point in the history
  • Loading branch information
EYHN committed Apr 1, 2024
1 parent 94ea6a0 commit 80c7750
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/frontend/core/src/utils/cloud-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ async function signIn(
url.searchParams.set(key, searchParams[key]);
}

const redirectUri =
runtimeConfig.serverUrlPrefix +
(environment.isDesktop
? buildRedirectUri('/open-app/signin-redirect')
: location.pathname);
const redirectUri = new URL(location.href);

url.searchParams.set('redirect_uri', redirectUri);
if (environment.isDesktop) {
redirectUri.pathname = buildRedirectUri('/open-app/signin-redirect');
}

url.searchParams.set('redirect_uri', redirectUri.toString());

return fetch(url.toString(), {
method: 'POST',
Expand Down

0 comments on commit 80c7750

Please sign in to comment.