fix(user): accept password/hashed password fields in create user#738
Open
dorsha wants to merge 1 commit into
Open
fix(user): accept password/hashed password fields in create user#738dorsha wants to merge 1 commit into
dorsha wants to merge 1 commit into
Conversation
…tions The API supports passing password/hashedPassword/seed when creating a user, but the SDK's UserOptions interface was missing these fields. This adds them so create, createTestUser, update, and invite all support password fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes descope/etc#16186
View workflow run
Done. Here's what I changed:
lib/management/types.ts— Addedpassword,hashedPassword, andseedfields to theUserOptionsinterface. Sincecreate,createTestUser,update, andinviteall spreadUserOptionsinto the request body, these fields now flow through to the API automatically.lib/management/user.test.ts— Added a test verifying thatcreatecorrectly passespassword,hashedPassword, andseedin the request body when using the options-style API.The fix is minimal because the infrastructure already existed —
UserPasswordHashedtypes were defined, batch operations already used them, and all single-user functions used the spread operator onUserOptions. The only gap was the interface definition.Created by Shuni 🐕