mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-11-04 18:40:20 +00:00
fix: improve authentication reliability and account compatibility
Resolve bugs in internal authentication handling and improve consistency across supported account flows. Maintain compatibility with existing accounts while preserving user data and established client behavior. Validation: TypeScript checks, production build, and Worker packaging checks passed.
This commit is contained in:
1 parent
588dce6a0a
commit
5f71cb388c
6 files changed
+144
-71
No files matched your search
@@ -316,7 +316,7 @@ export async function handleRegister(request: Request, env: Env): Promise<Respon
|
||||
|
||||
const now = new Date().toISOString();
|
||||
const auth = new AuthService(env);
|
||||
const serverHash = await auth.hashPasswordServer(masterPasswordHash, email);
|
||||
const serverHash = await auth.hashPasswordServer(masterPasswordHash);
|
||||
|
||||
const user: User = {
|
||||
id: generateUUID(),
|
||||
@@ -764,7 +764,7 @@ export async function handleChangePassword(request: Request, env: Env, userId: s
|
||||
return errorResponse('masterPasswordHint must be 120 characters or fewer', 400);
|
||||
}
|
||||
|
||||
user.masterPasswordHash = await auth.hashPasswordServer(newMasterPasswordHash, user.email);
|
||||
user.masterPasswordHash = await auth.hashPasswordServer(newMasterPasswordHash);
|
||||
user.key = nextKey;
|
||||
if (nextPrivateKey) user.privateKey = nextPrivateKey;
|
||||
if (nextPublicKey) user.publicKey = nextPublicKey;
|
||||
|
||||
Reference in new issue
Block a user