mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
core: lowercase email before login/signup
This commit is contained in:
@@ -66,6 +66,8 @@ class UserManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async signup(email, password) {
|
async signup(email, password) {
|
||||||
|
email = email.toLowerCase();
|
||||||
|
|
||||||
const hashedPassword = await this._storage.hash(password, email);
|
const hashedPassword = await this._storage.hash(password, email);
|
||||||
await http.post(`${constants.API_HOST}${ENDPOINTS.signup}`, {
|
await http.post(`${constants.API_HOST}${ENDPOINTS.signup}`, {
|
||||||
email,
|
email,
|
||||||
@@ -88,6 +90,8 @@ class UserManager {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
async _login({ email, password, hashedPassword, code, method }) {
|
async _login({ email, password, hashedPassword, code, method }) {
|
||||||
|
email = email.toLowerCase();
|
||||||
|
|
||||||
if (!hashedPassword) {
|
if (!hashedPassword) {
|
||||||
hashedPassword = await this._storage.hash(password, email);
|
hashedPassword = await this._storage.hash(password, email);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user