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.
- package/dist/src/cognito.d.ts +4 -0
- package/dist/src/cognito.js +12 -0
- package/package.json +1 -1
package/dist/src/cognito.d.ts
CHANGED
|
@@ -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
|
*/
|
package/dist/src/cognito.js
CHANGED
|
@@ -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
|
*/
|