diff --git a/console/src/app/app.component.ts b/console/src/app/app.component.ts index 57d9c5d796..39e331c6bc 100644 --- a/console/src/app/app.component.ts +++ b/console/src/app/app.component.ts @@ -8,7 +8,7 @@ import { DomSanitizer } from '@angular/platform-browser'; import { ActivatedRoute, Router, RouterOutlet } from '@angular/router'; import { LangChangeEvent, TranslateService } from '@ngx-translate/core'; import { Observable, of, Subject } from 'rxjs'; -import { map, takeUntil } from 'rxjs/operators'; +import { filter, map, takeUntil } from 'rxjs/operators'; import { accountCard, adminLineAnimation, navAnimations, routeAnimations, toolbarAnimation } from './animations'; import { Org } from './proto/generated/zitadel/org_pb'; @@ -191,6 +191,11 @@ export class AppComponent implements OnDestroy { } }); + this.activatedRoute.queryParams.pipe(filter((params) => !!params.org)).subscribe((params) => { + const { org } = params; + this.authService.getActiveOrg(org); + }); + this.authenticationService.authenticationChanged.pipe(takeUntil(this.destroy$)).subscribe((authenticated) => { if (authenticated) { this.authService diff --git a/console/src/app/modules/name-dialog/name-dialog.component.html b/console/src/app/modules/name-dialog/name-dialog.component.html index 7582e10ebe..fe1f6782ea 100644 --- a/console/src/app/modules/name-dialog/name-dialog.component.html +++ b/console/src/app/modules/name-dialog/name-dialog.component.html @@ -5,7 +5,7 @@