tango-app-ui-auth 3.5.0-beta.2 → 3.5.0-beta.3
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.
@@ -238,10 +238,10 @@ class TangoAuthLoginComponent {
|
|
238
238
|
if (resend) {
|
239
239
|
delete this.credentials['otp'];
|
240
240
|
}
|
241
|
+
const originalPassword = this.credentials.password;
|
241
242
|
const addonPassword = `${this.credentials.password}___${Math.floor(Date.now() / 1000)}`;
|
242
243
|
const secretKey = this.secretKey;
|
243
244
|
const encrypted = CryptoJS.AES.encrypt(addonPassword, secretKey).toString();
|
244
|
-
// this.credentials.password = crypto.AES.encrypt( this.credentials.password,'fc7154e0' ).toString();
|
245
245
|
this.credentials.password = encrypted;
|
246
246
|
this.service.login(this.credentials).pipe(takeUntil(this.destroy$)).subscribe({
|
247
247
|
next: (res) => {
|
@@ -275,13 +275,16 @@ class TangoAuthLoginComponent {
|
|
275
275
|
this.userProfile();
|
276
276
|
}
|
277
277
|
else if (!res || res?.code == 401) {
|
278
|
+
this.credentials.password = originalPassword;
|
278
279
|
this.toastService.getErrorToast('Enter Valid Credentials');
|
279
280
|
}
|
280
281
|
else {
|
282
|
+
this.credentials.password = originalPassword;
|
281
283
|
this.toastService.getErrorToast('Enter Valid Credentials');
|
282
284
|
}
|
283
285
|
},
|
284
286
|
error: (err) => {
|
287
|
+
this.credentials.password = originalPassword;
|
285
288
|
this.hasError = true;
|
286
289
|
if (this.pageSection === 'otp') {
|
287
290
|
this.toastService.getErrorToast('Invalid OTP');
|