Skip to content

Commit

Permalink
modify password reset sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
emrgnt-cmplxty committed Jan 8, 2025
1 parent 465b155 commit d82b8b7
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions js/sdk/src/v3/clients/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,27 @@ export class UsersClient {
});
}

/**
* Request a password reset.
* @param email User's email address
* @returns
*/
// /**
// * Request a password reset.
// * @param email User's email address
// * @returns
// */
// @feature("users.requestPasswordReset")
// async requestPasswordReset(options: {
// email: string;
// }): Promise<WrappedGenericMessageResponse> {
// return this.client.makeRequest("POST", "users/request-password-reset", {
// data: options,
// });
// }

@feature("users.requestPasswordReset")
async requestPasswordReset(options: {
email: string;
}): Promise<WrappedGenericMessageResponse> {
async requestPasswordReset(email: string): Promise<WrappedGenericMessageResponse> {
return this.client.makeRequest("POST", "users/request-password-reset", {
data: options,
data: email, // Pass the raw string email
headers: {
"Content-Type": "text/plain", // Ensure headers specify plain text
},
});
}

Expand Down

0 comments on commit d82b8b7

Please sign in to comment.