Commit 2483758
authored
Fix reset_password to handle wrapped API response (#406)
The WorkOS API returns password reset responses in wrapped format
{"user": {...}} rather than a flat user object. This caused
reset_password to return a User object with all nil fields despite
successful API calls.
Changes:
- Updated reset_password to use UserResponse.new(response.body).user
to correctly unwrap the API response (line 872)
- Updated VCR cassette to match current API response format
Verified:
- Tested against real WorkOS API with local code changes
- User object now correctly populated with all fields
- All 119 user_management tests pass
- Response format matches Go and Node.js SDK implementations
- Resolves customer issue where password reset succeeded but
returned User object with all null fields1 parent 1931e3f commit 2483758
File tree
2 files changed
+2
-2
lines changed- lib/workos
- spec/support/fixtures/vcr_cassettes/user_management/reset_password
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
| 872 | + | |
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
| |||
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments