Skip to content

Commit ce9b584

Browse files
fix: redirect after auth
1 parent c1c5ac8 commit ce9b584

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

client/packages/lowcoder/src/pages/userAuth/authUtils.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export function authRespValidate(
7878
onAuthSuccess?: () => void
7979
) {
8080
let replaceUrl = redirectUrl || BASE_URL;
81+
const baseUrl = `${window.location.protocol}//${window.location.host}`;
8182
if (infoCompleteCheck) {
8283
// need complete info
8384
replaceUrl = redirectUrl
@@ -86,7 +87,7 @@ export function authRespValidate(
8687
}
8788
if (doValidResponse(resp)) {
8889
onAuthSuccess?.();
89-
history.replace(replaceUrl);
90+
history.replace(replaceUrl.replace(baseUrl, ''));
9091
} else if (
9192
resp.data.code === SERVER_ERROR_CODES.EXCEED_MAX_USER_ORG_COUNT ||
9293
resp.data.code === SERVER_ERROR_CODES.ALREADY_IN_ORGANIZATION

0 commit comments

Comments
 (0)