Skip to content

Add new supported password hash types #461

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

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

Conversation

alastair
Copy link

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.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

@alastair alastair requested a review from a team as a code owner July 16, 2025 09:26
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

  1. This PR is extremely safe to merge as it only expands type definitions to match existing functionality
  2. The changes are minimal, well-documented, and match WorkOS's official documentation
  3. The modified file workos/types/user_management/password_hash_type.py requires minimal review attention as the change is simple and self-contained

1 file reviewed, no comments
Edit PR Review Bot Settings | Greptile

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

Successfully merging this pull request may close these issues.

invalid types for user_management.create_user password_hash_type
2 participants