feat: lowercase all email inputs before POST

This commit is contained in:
thecodrr
2021-04-05 13:24:31 +05:00
parent c67a9171b4
commit cebee4627e
2 changed files with 3 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ function ForgotPasswordDialog(props) {
setError();
setIsLoading(true);
db.user
.recoverAccount(data.email)
.recoverAccount(data.email.toLowerCase())
.then(() => {
showToast(
"success",

View File

@@ -69,7 +69,7 @@ class UserStore extends BaseStore {
login = (form) => {
this.set((state) => (state.isLoggingIn = true));
return db.user
.login(form.email, form.password, form.remember)
.login(form.email.toLowerCase(), form.password, form.remember)
.then(() => {
return showLoadingDialog({
title: "Importing your data...",
@@ -93,7 +93,7 @@ class UserStore extends BaseStore {
signup = (form) => {
this.set((state) => (state.isSigningIn = true));
return db.user
.signup(form.email, form.password)
.signup(form.email.toLowerCase(), form.password)
.then(() => {
return this.init();
})