Add new supported password hash types#461
Conversation
There was a problem hiding this comment.
Greptile Summary
This PR updates the PasswordHashType type definition in the WorkOS Python SDK to include two additional password hash algorithms that are already supported by WorkOS but were missing from the type definitions: pbkdf2 and scrypt. This change ensures type safety when importing users with passwords hashed using these algorithms.
The change is straightforward and only affects type definitions - it adds two new string literals to the existing PasswordHashType Literal type. This update aligns the SDK's type system with WorkOS's documented capabilities at https://workos.com/docs/migrate/other-services/2-importing-users-into-workos/importing-passwords.
Confidence score: 5/5
- This PR is extremely safe to merge as it only expands type definitions to match existing functionality
- The changes are minimal, well-documented, and match WorkOS's official documentation
- The modified file
workos/types/user_management/password_hash_type.pyrequires minimal review attention as the change is simple and self-contained
1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile
|
|
||
|
|
||
| PasswordHashType = Literal["bcrypt", "firebase-scrypt", "ssha"] | ||
| PasswordHashType = Literal["bcrypt", "firebase-scrypt", "pbkdf2", "scrypt", "ssha"] |
There was a problem hiding this comment.
Thanks for this contribution! While we're at it, could we also add argon2?
https://workos.com/docs/reference/authkit/user/create
Fixes #460
Description
The types in the python library didn't match the list of valid hash types at https://workos.com/docs/migrate/other-services/2-importing-users-into-workos/importing-passwords
Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.