Skip to content

Commit 6b48abd

Browse files
Fix redirect after auth login (#499)
* fix: update lowcoder-sdk version * fix: redirect after auth --------- Co-authored-by: Falk Wolsky <fw@business-inventor.com>
1 parent 95d2973 commit 6b48abd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

client/packages/lowcoder-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-sdk",
3-
"version": "2.1.7",
3+
"version": "2.1.8",
44
"type": "module",
55
"files": [
66
"src",

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)