@open-rlb/ng-app 3.1.93 → 3.1.95

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.
@@ -1538,6 +1538,8 @@ class AuthenticationService {
1538
1538
  this.aclStore = inject(AclStore);
1539
1539
  this._authReady$ = new ReplaySubject(1);
1540
1540
  this.authReady$ = this._authReady$.asObservable();
1541
+ this._authenticated$ = new ReplaySubject(1);
1542
+ this.authenticated$ = this._authenticated$.asObservable();
1541
1543
  this.logger = this.log.for(this.constructor.name);
1542
1544
  this.logger.log('AuthenticationService initialized');
1543
1545
  }
@@ -1564,8 +1566,17 @@ class AuthenticationService {
1564
1566
  return this.aclStore.loadACL(undefined).pipe(map(() => responses));
1565
1567
  }
1566
1568
  }), tap({
1567
- next: () => this._authReady$.next(),
1568
- error: () => this._authReady$.next(),
1569
+ next: (responses) => {
1570
+ this._authReady$.next();
1571
+ if (responses.some(r => r.isAuthenticated)) {
1572
+ this._authenticated$.next();
1573
+ }
1574
+ this._authenticated$.complete();
1575
+ },
1576
+ error: () => {
1577
+ this._authReady$.next();
1578
+ this._authenticated$.complete();
1579
+ },
1569
1580
  }));
1570
1581
  }
1571
1582
  login(targetUrl) {