Skip to content

Commit d8fd3d4

Browse files
authored
Merge pull request #504 from lowcoder-org/dev
Fix redirect after auth login (#499)
2 parents c1c5ac8 + dba4290 commit d8fd3d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy