diff --git a/packages/chaire-lib-frontend/src/components/forms/auth/localLogin/LoginForm.tsx b/packages/chaire-lib-frontend/src/components/forms/auth/localLogin/LoginForm.tsx index 9e7a6ed7..a4c12592 100644 --- a/packages/chaire-lib-frontend/src/components/forms/auth/localLogin/LoginForm.tsx +++ b/packages/chaire-lib-frontend/src/components/forms/auth/localLogin/LoginForm.tsx @@ -64,7 +64,7 @@ export class LoginPage extends React.Component) => { - const usernameOrEmail = e.target.value; + const usernameOrEmail = e.target.value.replaceAll(' ', ''); // E-mails and usernames can't have spaces this.setState(() => ({ usernameOrEmail })); }; diff --git a/packages/chaire-lib-frontend/src/components/forms/auth/localLogin/RegisterForm.tsx b/packages/chaire-lib-frontend/src/components/forms/auth/localLogin/RegisterForm.tsx index e7d64178..6aa61857 100644 --- a/packages/chaire-lib-frontend/src/components/forms/auth/localLogin/RegisterForm.tsx +++ b/packages/chaire-lib-frontend/src/components/forms/auth/localLogin/RegisterForm.tsx @@ -104,7 +104,7 @@ export class RegisterForm extends React.Component): void => { - const usernameOrEmail = e.target.value; + const usernameOrEmail = e.target.value.replaceAll(' ', ''); // E-mails and usernames can't have spaces if (usernameOrEmail) { this.setState(() => ({ email: usernameOrEmail })); } // allow empty string diff --git a/packages/chaire-lib-frontend/src/components/forms/auth/passwordless/PwdLessLoginForm.tsx b/packages/chaire-lib-frontend/src/components/forms/auth/passwordless/PwdLessLoginForm.tsx index 9dcf1ebf..eac73529 100644 --- a/packages/chaire-lib-frontend/src/components/forms/auth/passwordless/PwdLessLoginForm.tsx +++ b/packages/chaire-lib-frontend/src/components/forms/auth/passwordless/PwdLessLoginForm.tsx @@ -64,7 +64,7 @@ export class LoginPage extends React.Component) => { - const email = e.target.value; + const email = e.target.value.replaceAll(' ', ''); // E-mail adresses cannot have spaces this.setState(() => ({ email })); };