auth/password_argon2.ts view source
PasswordHashDeps Argon2id implementation of PasswordHashDeps.
Pass as password in AppDeps / CreateAppBackendOptions for production use.
Argon2id password hashing implementation.
Uses @node-rs/argon2 for native performance with OWASP-recommended parameters.
Includes timing attack resistance via verify_dummy.
Import argon2_password_deps for use as PasswordHashDeps in AppDeps.
4 declarations
auth/password_argon2.ts view source
PasswordHashDeps Argon2id implementation of PasswordHashDeps.
Pass as password in AppDeps / CreateAppBackendOptions for production use.
auth/password_argon2.ts view source
(password: string): Promise<string> Hash a password using Argon2id.
passwordthe plaintext password to hash
stringPromise<string> the Argon2id hash string
auth/password_argon2.ts view source
(password: string): Promise<boolean> Verify a password against a dummy hash for timing attack resistance.
Always returns false, but takes the same time as a real verification.
Call when account lookup fails to prevent timing-based user enumeration.
passwordthe plaintext password to "verify"
stringPromise<boolean> always false
auth/password_argon2.ts view source
(password: string, password_hash: string): Promise<boolean> Verify a password against an Argon2id hash.
passwordthe plaintext password to verify
stringpassword_hashthe Argon2id hash to verify against
stringPromise<boolean> true if the password matches