Skip to content

Commit 4b58461

Browse files
show error message if user not found in login flow
1 parent d302efe commit 4b58461

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3205,6 +3205,7 @@ export const en = {
32053205
"enterPassword": "Enter your password",
32063206
"selectAuthProvider": "Select Authentication Provider",
32073207
"selectWorkspace": "Select your workspace",
3208+
"userNotFound": "User not found. Please make sure you entered the correct email."
32083209
},
32093210
"preLoad": {
32103211
"jsLibraryHelpText": "Add JavaScript Libraries to Your Current Application via URL Addresses. lodash, day.js, uuid, numbro are Built into the System for Immediate Use. JavaScript Libraries are Loaded Before the Application is Initialized, Which Can Have an Impact on Application Performance.",

client/packages/lowcoder/src/pages/userAuth/formLoginSteps.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,12 @@ export default function FormLoginSteps(props: FormLoginProps) {
177177
setElements({elements: resp.data || [], total: resp.total || 1})
178178
setOrgList(resp.data);
179179
if (!resp.data.length) {
180-
history.push(
181-
AUTH_REGISTER_URL,
182-
{...location.state || {}, email: account},
183-
)
184-
return;
180+
// history.push(
181+
// AUTH_REGISTER_URL,
182+
// {...location.state || {}, email: account},
183+
// )
184+
// return;
185+
throw new Error(trans("userAuth.userNotFound"));
185186
}
186187
if (resp.data.length === 1) {
187188
setOrganizationId(resp.data[0].orgId);
@@ -228,7 +229,7 @@ export default function FormLoginSteps(props: FormLoginProps) {
228229
<AuthBottomView>
229230
<StyledRouteLink to={{
230231
pathname: AUTH_REGISTER_URL,
231-
state: location.state
232+
state: {...location.state || {}, email: account}
232233
}}>
233234
{trans("userAuth.register")}
234235
</StyledRouteLink>

0 commit comments

Comments
 (0)