@annalib/anna-cognito-lib 2.2.26 → 2.2.28
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/esm2020/lib/config/sso-login-service.token.mjs +1 -1
- package/esm2020/lib/services/auth.service.mjs +14 -15
- package/fesm2015/annalib-anna-cognito-lib.mjs +13 -14
- package/fesm2015/annalib-anna-cognito-lib.mjs.map +1 -1
- package/fesm2020/annalib-anna-cognito-lib.mjs +13 -14
- package/fesm2020/annalib-anna-cognito-lib.mjs.map +1 -1
- package/lib/config/sso-login-service.token.d.ts +0 -6
- package/package.json +1 -1
|
@@ -293,13 +293,11 @@ class AnnaLibAuthService {
|
|
|
293
293
|
confirmResetPassword({ username: this.consumingProjectAuthService.userName, newPassword: newPassword, confirmationCode: confirmationCode }).then((response) => {
|
|
294
294
|
this.expiryAllExistingCurrentSession(this.consumingProjectAuthService.userName, newPassword);
|
|
295
295
|
}, (err) => {
|
|
296
|
-
console.log(err);
|
|
297
296
|
this.noOfAttempts = this.noOfAttempts + 1;
|
|
298
297
|
this.verifyAndSetNewPasswordErrorMessage = this.forgotPasswordError(err, this.noOfAttempts);
|
|
299
298
|
});
|
|
300
299
|
}
|
|
301
300
|
catch (err) {
|
|
302
|
-
console.log(err);
|
|
303
301
|
this.noOfAttempts = this.noOfAttempts + 1;
|
|
304
302
|
this.verifyAndSetNewPasswordErrorMessage = this.forgotPasswordError(err, this.noOfAttempts);
|
|
305
303
|
}
|
|
@@ -308,18 +306,19 @@ class AnnaLibAuthService {
|
|
|
308
306
|
}
|
|
309
307
|
}
|
|
310
308
|
forgotPasswordError(err, noOfAttempts) {
|
|
311
|
-
let errorMessage;
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
309
|
+
let errorMessage = '';
|
|
310
|
+
console.log(err);
|
|
311
|
+
let errorThrown = JSON.stringify(err);
|
|
312
|
+
if (errorThrown.includes("LimitExceededException")) {
|
|
313
|
+
this.sessionLocked = true;
|
|
314
|
+
errorMessage = LoginConstant.attemptLimitExceeded;
|
|
315
|
+
}
|
|
316
|
+
else if (errorThrown.includes("ExpiredCodeException")) {
|
|
317
|
+
errorMessage = LoginConstant.sessionExpired;
|
|
318
|
+
this.verifyAndSetNewPasswordButton = LoginConstant.regenerateOtp;
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
errorMessage = LoginConstant.attempt + " " + noOfAttempts + LoginConstant.attemptMessage;
|
|
323
322
|
}
|
|
324
323
|
return errorMessage;
|
|
325
324
|
}
|