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