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

Replace bcrypt and workFactor options to password field with generic kdf option #9471

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

emmatown
Copy link
Member

@emmatown emmatown commented Feb 12, 2025

This pull request replaces the bcrypt and workFactor options in the password field with a more flexible key derivation function (kdf) interface.

Rather than assume bcrypt, the new approach supports developers to provide any key derivation function with hash and compare methods, making it easier to integrate alternative modern password hashing mechanisms like Argon2.

The default remains for now as bcryptjs with a work factor of 10, ensuring compatibility for existing users who do not override the default.

Additionally, this pull request adds a method for retrieving the new interface from your GraphQL schema object using getPasswordKDF rather than forcing developers to cast and understand the intricacies of the GraphQL schema object.

@emmatown emmatown force-pushed the password-field-kdf-option branch from 85f64db to 72ddd83 Compare February 12, 2025 04:59
@emmatown emmatown requested a review from dcousens February 12, 2025 05:06
@dcousens dcousens merged commit e3e1f8d into main Feb 12, 2025
45 checks passed
@dcousens dcousens deleted the password-field-kdf-option branch February 12, 2025 05:53
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.

2 participants