Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth: remove trailing space in email on login forms #721

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

davidmurray
Copy link
Collaborator

@davidmurray davidmurray commented Sep 21, 2023

Fixes #720

cc @tahini

Copy link
Collaborator

@tahini tahini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, can you add this too the the localLogin's LoginForm and RegisterForm, which will have the same issue (the username should not have spaces either)

@davidmurray
Copy link
Collaborator Author

Thanks, can you add this too the the localLogin's LoginForm and RegisterForm, which will have the same issue (the username should not have spaces either)

c'est fait!

@@ -64,7 +64,7 @@ export class LoginPage extends React.Component<LoginPageProps & WithTranslation,
};

onUsernameOrEmailChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const usernameOrEmail = e.target.value;
const usernameOrEmail = e.target.value.replace(' ', ''); // E-mails and usernames can't have spaces
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copy-pasted a string with like, a lot of trailing spaces and only one was replaced, I think you should put replaceAll here instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

très bon point! fixed it :)

@tahini tahini merged commit 9f2329d into chairemobilite:main Sep 26, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auth: remove trailing space in email on login forms
2 participants