idea-aws 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,6 +85,10 @@ export declare class Cognito {
85
85
  * Send to a user the instructions to change the password.
86
86
  */
87
87
  forgotPassword(email: string, cognitoUserPoolClientId: string): Promise<CognitoIP.CodeDeliveryDetailsType>;
88
+ /**
89
+ * Complete the flow of a password forgot.
90
+ */
91
+ confirmForgotPassword(email: string, newPassword: string, confirmationCode: string, cognitoUserPoolClientId: string): Promise<void>;
88
92
  /**
89
93
  * Update a (Cognito)User's attributes, excluding the attributes that require specific methods.
90
94
  */
@@ -286,6 +286,18 @@ class Cognito {
286
286
  const { CodeDeliveryDetails } = await this.cognito.send(command);
287
287
  return CodeDeliveryDetails;
288
288
  }
289
+ /**
290
+ * Complete the flow of a password forgot.
291
+ */
292
+ async confirmForgotPassword(email, newPassword, confirmationCode, cognitoUserPoolClientId) {
293
+ const command = new CognitoIP.ConfirmForgotPasswordCommand({
294
+ ClientId: cognitoUserPoolClientId,
295
+ Username: email,
296
+ ConfirmationCode: confirmationCode,
297
+ Password: newPassword
298
+ });
299
+ await this.cognito.send(command);
300
+ }
289
301
  /**
290
302
  * Update a (Cognito)User's attributes, excluding the attributes that require specific methods.
291
303
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idea-aws",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "AWS wrappers to use in IDEA's back-ends",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",