mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
core: fix fallback key encryption
This commit is contained in:
@@ -150,7 +150,7 @@ class UserManager {
|
|||||||
token.access_token
|
token.access_token
|
||||||
)
|
)
|
||||||
.catch(async (e) => {
|
.catch(async (e) => {
|
||||||
if (e instanceof Error && e.message === "invalid_grant") {
|
if (e instanceof Error && e.message === "Password is incorrect.") {
|
||||||
hashedPassword = await this.db
|
hashedPassword = await this.db
|
||||||
.storage()
|
.storage()
|
||||||
.hash(password, email, { usesFallback: true });
|
.hash(password, email, { usesFallback: true });
|
||||||
@@ -580,6 +580,7 @@ class UserManager {
|
|||||||
},
|
},
|
||||||
token
|
token
|
||||||
);
|
);
|
||||||
|
await this.db.kv().write("usesFallbackPWHash", false);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user