Skip to main content

PasswordHashingStrategy

PasswordHashingStrategy

Defines how user passwords get hashed when using the NativeAuthenticationStrategy.

info

This is configured via the authOptions.passwordHashingStrategy property of your VendureConfig.

Signature
interface PasswordHashingStrategy extends InjectableStrategy {
hash(plaintext: string): Promise<string>;
check(plaintext: string, hash: string): Promise<boolean>;
}

hash

method
(plaintext: string) => Promise<string>

check

method
(plaintext: string, hash: string) => Promise<boolean>