Skip to content

Commit 6706845

Browse files
Merge pull request #28 from ModusCreateOrg/ADE-137
[ADE-137] - Update auth error messages for clarity and improve email validation prompt
2 parents 0ab0fec + 256d6dd commit 6706845

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

frontend/src/common/utils/auth-errors.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import { AuthError } from '../models/auth';
55
*/
66
export const AUTH_ERROR_MESSAGES: Record<string, string> = {
77
// Sign In errors
8-
'UserNotFoundException': 'The email address or password you entered is incorrect.',
9-
'NotAuthorizedException': 'The email address or password you entered is incorrect.',
8+
'UserNotFoundException': 'Incorrect email or password.',
9+
'NotAuthorizedException': 'Incorrect email or password.',
1010
'UserNotConfirmedException': 'Please check your email to verify your account.',
1111
'PasswordResetRequiredException': 'You need to reset your password. Please check your email.',
1212

1313
// Sign Up errors
14-
'UsernameExistsException': 'This email address is already associated with an account. Please sign in or reset your password.',
14+
'UsernameExistsException': 'This email is already linked to an account. Please sign in or reset your password.',
1515
'InvalidPasswordException': 'Password does not meet the requirements. Please use a stronger password.',
1616
'InvalidParameterException': 'Please check your input and try again.',
1717

frontend/src/common/utils/i18n/resources/en/auth.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"numeric": "Must contain only numbers",
7171
"exact-length": "Must be exactly {{length}} characters",
7272
"passwords-match": "Passwords must match",
73-
"email": "Please enter a valid email address",
73+
"email": "Please provide a valid email address (e.g., [email protected]).",
7474
"required": "This field is required",
7575
"min-length": "Must be at least {{length}} characters",
7676
"max-length": "Must be at most {{length}} characters",

frontend/src/pages/Auth/SignUp/SignUpPage.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
height: 100%;
55
display: flex;
66
flex-direction: column;
7-
justify-content: center;
7+
padding-top: 1rem;
88
}
99

1010
.ls-signup-page__form {

frontend/src/pages/Auth/SignUp/SignUpPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const SignUpPage = ({ testid = 'page-signup' }: SignUpPageProps): JSX.Element =>
2626
<ProgressProvider>
2727
<Header title={t('signup', { ns: 'auth' })} />
2828

29-
<IonContent fullscreen className="ion-padding">
29+
<IonContent fullscreen className="ion-padding" scrollY={true}>
3030
<Container className="ls-signup-page__container" fixed>
3131
<SignUpForm className="ls-signup-page__form" />
3232
</Container>

frontend/src/pages/Auth/SignUp/components/SignUpForm.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22
padding: 1rem;
33

44
.ls-signup-form__input {
5-
margin-bottom: 16px;
5+
margin-bottom: 1rem;
66
}
77

88
.ls-signup-form__button {
9-
margin-top: 16px;
9+
margin-top: 1rem;
1010
}
1111

1212
&__password-guidelines {
13-
margin-top: -8px;
14-
margin-bottom: 16px;
13+
margin-top: -0.5rem;
14+
margin-bottom: 1rem;
1515
font-size: 0.85rem;
1616

1717
&-header {
18-
margin-bottom: 4px;
18+
margin-bottom: 0.25rem;
1919
font-weight: 500;
2020
}
2121

2222
&-item {
2323
display: flex;
2424
align-items: center;
25-
margin-bottom: 2px;
25+
margin-bottom: 0.125rem;
2626

2727
&-icon {
28-
margin-right: 6px;
28+
margin-right: 0.375rem;
2929
}
3030

3131
&-valid {

frontend/src/pages/Auth/SignUp/components/SignUpForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const SignUpForm = ({ className, testid = 'form-signup' }: SignUpFormProps): JSX
129129
<AuthErrorDisplay
130130
error={error}
131131
showDetails={true}
132-
className="ion-margin-bottom"
132+
className="ion-margin-bottom ion-margin-top"
133133
testid={`${testid}-error`}
134134
/>
135135

0 commit comments

Comments
 (0)