@dereekb/dbx-firebase 13.11.9 → 13.11.11

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.
@@ -763,10 +763,14 @@ class DbxFirebaseOAuthLoginComponent {
763
763
  this.errorMessage.set(null);
764
764
  this.interactionService.submitLogin(uid).subscribe({
765
765
  next: (response) => {
766
- this.submitting.set(false);
767
766
  if (response.redirectTo) {
767
+ // Leave `submitting` true so the auto-submit effect cannot re-enter
768
+ // and fire another `submitLogin` POST while the browser navigates.
768
769
  window.location.href = response.redirectTo;
769
770
  }
771
+ else {
772
+ this.submitting.set(false);
773
+ }
770
774
  },
771
775
  error: () => {
772
776
  this.submitting.set(false);
@@ -900,7 +904,7 @@ class DbxOAuthConsentComponent {
900
904
  const grantedOIDCScopes = formValue.grantedOIDCScopes;
901
905
  context.startWorkingWithObservable(this.interactionService.submitConsent(uid, true, { grantedOIDCScopes }).pipe(tap((response) => {
902
906
  if (response.redirectTo) {
903
- window.location.href = response.redirectTo;
907
+ globalThis.location.href = response.redirectTo;
904
908
  }
905
909
  })));
906
910
  };
@@ -916,7 +920,7 @@ class DbxOAuthConsentComponent {
916
920
  }
917
921
  context.startWorkingWithObservable(this.interactionService.submitConsent(uid, false).pipe(tap((response) => {
918
922
  if (response.redirectTo) {
919
- window.location.href = response.redirectTo;
923
+ globalThis.location.href = response.redirectTo;
920
924
  }
921
925
  })));
922
926
  };