Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

core: lowercase email before login/signup

Abdullah Attadf06881eee46
diff --git a/packages/core/api/user-manager.js b/packages/core/api/user-manager.js
index d60d280e2..ef52963c4 100644
--- a/packages/core/api/user-manager.js
+++ b/packages/core/api/user-manager.js
@@ -66,6 +66,8 @@ class UserManager {
}
async signup(email, password) {
+ email = email.toLowerCase();
+
const hashedPassword = await this._storage.hash(password, email);
await http.post(`${constants.API_HOST}${ENDPOINTS.signup}`, {
email,
@@ -88,6 +90,8 @@ class UserManager {
* @private
*/
async _login({ email, password, hashedPassword, code, method }) {
+ email = email.toLowerCase();
+
if (!hashedPassword) {
hashedPassword = await this._storage.hash(password, email);
}