tango-app-ui-auth 3.5.0-beta.8-prod-dev10 → 3.5.0-beta.8-prod-dev12

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.
@@ -267,7 +267,7 @@ class TangoAuthLoginComponent {
267
267
  }
268
268
  onCaptchaResolved(token) {
269
269
  this.captchaToken = token;
270
- // console.log('Captcha token:', token);
270
+ console.log('Captcha token:', token);
271
271
  this.cd.detectChanges();
272
272
  }
273
273
  ngOnDestroy() {
@@ -299,9 +299,11 @@ class TangoAuthLoginComponent {
299
299
  loginAttemptCount = 0;
300
300
  onLogin(resend) {
301
301
  // localStorage.clear();
302
- if (!this.captchaToken) {
303
- alert('Please complete the reCAPTCHA');
304
- return;
302
+ if (this.pageSection !== 'otp') {
303
+ if (!this.captchaToken) {
304
+ alert('Please complete the reCAPTCHA');
305
+ return;
306
+ }
305
307
  }
306
308
  this.hasError = false;
307
309
  this.isLoading = true;
@@ -312,7 +314,12 @@ class TangoAuthLoginComponent {
312
314
  if (resend) {
313
315
  delete this.credentials['otp'];
314
316
  }
315
- this.credentials['captchaToken'] = this.captchaToken;
317
+ if (this.pageSection === 'otp') {
318
+ delete this.credentials['captchaToken'];
319
+ }
320
+ else {
321
+ this.credentials['captchaToken'] = this.captchaToken;
322
+ }
316
323
  const originalPassword = this.credentials.password;
317
324
  const addonPassword = `${this.credentials.password}___${Math.floor(Date.now() / 1000)}`;
318
325
  const secretKey = this.secretKey;