From 4021aedb07378bee67d1293e372fdd765ad297af Mon Sep 17 00:00:00 2001 From: CompassLuo Date: Mon, 29 Dec 2025 00:13:41 +0800 Subject: [PATCH] Invert password verification condition Add '!' in front of password verify condition make it's logic right --- docs/essential/best-practice.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/essential/best-practice.md b/docs/essential/best-practice.md index 9e32090d..78190001 100644 --- a/docs/essential/best-practice.md +++ b/docs/essential/best-practice.md @@ -95,7 +95,7 @@ export abstract class Auth { WHERE username = ${username} LIMIT 1` - if (await Bun.password.verify(password, user.password)) + if (!await Bun.password.verify(password, user.password)) // You can throw an HTTP error directly throw status( 400,