Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add options for custom password hashing/verifying functions #374

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

naivecrocus
Copy link

Hi, this PR proposes to move the hash generation and verification to separate functions and allow them to be overridden by the users via the new options generatePasswordHashAsync and verifyPasswordHashAsync. This makes it possible to use alternative hash functions (e.g., argon2), while the default behaviour is not changed and backwards-compatible. I also removed the "scmp" package and replaced it with the native crypto.timingSafeEqual function.

Please let me know the chances of this change being merged, I am happy to address any code reviews or feedback!

This should fix issues like #271, #298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant