diff --git a/build/dockerfile b/build/dockerfile index b59cf06a6a..98c3f59672 100644 --- a/build/dockerfile +++ b/build/dockerfile @@ -18,7 +18,7 @@ ENV PROTOC_ARCH x86_64 ## protoc and protoc-gen-grpc-web for later use ####################### FROM ${BUILDARCH}-base AS base -ARG PROTOC_VERSION=3.14.0 +ARG PROTOC_VERSION=3.13.0 ARG PROTOC_ZIP=protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip ARG GRPC_WEB_VERSION=1.2.1 # no arm specific version available and x86 works fine at the moment: diff --git a/console/package-lock.json b/console/package-lock.json index 4b33c089f6..419d0fd71a 100644 --- a/console/package-lock.json +++ b/console/package-lock.json @@ -10721,6 +10721,11 @@ } } }, + "libphonenumber-js": { + "version": "1.9.13", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.13.tgz", + "integrity": "sha512-DOvAj9Now6KqP+L1Q3JrM3iNhH/mXiOPTj6kxb9OnJbYsVYRlVdvRY1kCpU3Tz9VegIEi6MgDrviBaAnvB3aSw==" + }, "license-webpack-plugin": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.3.11.tgz", diff --git a/console/package.json b/console/package.json index 63b98698f6..5cf8c6ea98 100644 --- a/console/package.json +++ b/console/package.json @@ -35,6 +35,7 @@ "google-protobuf": "^3.13.0", "grpc": "^1.24.5", "grpc-web": "^1.2.1", + "libphonenumber-js": "^1.9.13", "moment": "^2.29.1", "ngx-quicklink": "^0.2.6", "rxjs": "~6.6.3", diff --git a/console/src/app/app.component.html b/console/src/app/app.component.html index 749c75e71e..ba6737cdd8 100644 --- a/console/src/app/app.component.html +++ b/console/src/app/app.component.html @@ -58,9 +58,11 @@ {{'MENU.DOCUMENTATION' | translate}}
- + [name]="user.human.profile.displayName ? user.human.profile.displayName : (user.human.profile.firstName + ' '+ user.human.profile.lastName)" + [size]="38"> diff --git a/console/src/app/modules/app-card/app-card.component.html b/console/src/app/modules/app-card/app-card.component.html index 9023bc3143..530b71e5b9 100644 --- a/console/src/app/modules/app-card/app-card.component.html +++ b/console/src/app/modules/app-card/app-card.component.html @@ -1,5 +1,5 @@ -
+
\ No newline at end of file diff --git a/console/src/app/modules/app-card/app-card.component.ts b/console/src/app/modules/app-card/app-card.component.ts index 1e5012d7ee..1ab0af6578 100644 --- a/console/src/app/modules/app-card/app-card.component.ts +++ b/console/src/app/modules/app-card/app-card.component.ts @@ -10,5 +10,5 @@ export class AppCardComponent { @Input() public outline: boolean = false; @Input() public type!: OIDCAppType; @Input() public isApiApp: boolean = false; - public OIDCApplicationType: any = OIDCAppType; + public OIDCAppType: any = OIDCAppType; } diff --git a/console/src/app/modules/changes/changes.component.ts b/console/src/app/modules/changes/changes.component.ts index d5ecaf58fa..1dfa1542a1 100644 --- a/console/src/app/modules/changes/changes.component.ts +++ b/console/src/app/modules/changes/changes.component.ts @@ -152,6 +152,7 @@ export class ChangesComponent implements OnInit, OnDestroy { take(1), tap((res: ListChanges) => { const values = res.resultList; + console.log(values); const mapped = this.mapChanges(values); // update source with new values, done loading // this._data.next(values); @@ -184,7 +185,7 @@ export class ChangesComponent implements OnInit, OnDestroy { const userData: any = { editor: change.editorDisplayName, editorId: change.editorId, - editorName: change.editorDisplayName, + editorDisplayName: change.editorDisplayName, dates: [change.changeDate], // data: [change.data], @@ -205,7 +206,7 @@ export class ChangesComponent implements OnInit, OnDestroy { { editor: change.editorDisplayName, editorId: change.editorId, - editorName: change.editorDisplayName, + editorDisplayName: change.editorDisplayName, dates: [change.changeDate], // data: [change.data], diff --git a/console/src/app/modules/machine-keys/machine-keys.component.html b/console/src/app/modules/machine-keys/machine-keys.component.html index 1850ddade4..da44d24d9b 100644 --- a/console/src/app/modules/machine-keys/machine-keys.component.html +++ b/console/src/app/modules/machine-keys/machine-keys.component.html @@ -41,7 +41,7 @@ {{ 'USER.MACHINE.CREATIONDATE' | translate }} - {{key.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm'}} + {{key.details?.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm'}} diff --git a/console/src/app/modules/machine-keys/machine-keys.component.ts b/console/src/app/modules/machine-keys/machine-keys.component.ts index 8b662ccc3d..0769aaf458 100644 --- a/console/src/app/modules/machine-keys/machine-keys.component.ts +++ b/console/src/app/modules/machine-keys/machine-keys.component.ts @@ -126,6 +126,7 @@ export class MachineKeysComponent implements OnInit { if (this.userId) { this.mgmtService.listMachineKeys(this.userId, limit, offset).then(resp => { this.keyResult = resp; + console.log(resp); if (resp.resultList) { this.dataSource.data = resp.resultList; } diff --git a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts index 162b194ed5..9c9f66f950 100644 --- a/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts +++ b/console/src/app/modules/policies/password-complexity-policy/password-complexity-policy.component.ts @@ -12,6 +12,7 @@ import { PasswordComplexityPolicy } from 'src/app/proto/generated/zitadel/policy import { AdminService } from 'src/app/services/admin.service'; import { ManagementService } from 'src/app/services/mgmt.service'; import { ToastService } from 'src/app/services/toast.service'; + import { CnslLinks } from '../../links/links.component'; import { IAM_LABEL_LINK, @@ -76,6 +77,7 @@ export class PasswordComplexityPolicyComponent implements OnDestroy { this.getData().then(data => { if (data.policy) { this.complexityData = data.policy; + console.log(data.policy); this.loading = false; } }); diff --git a/console/src/app/modules/project-members/project-members-datasource.ts b/console/src/app/modules/project-members/project-members-datasource.ts index 9f37e8c97f..8a1fd044a7 100644 --- a/console/src/app/modules/project-members/project-members-datasource.ts +++ b/console/src/app/modules/project-members/project-members-datasource.ts @@ -6,7 +6,10 @@ import { ListProjectGrantMembersResponse, ListProjectMembersResponse } from 'src import { Member } from 'src/app/proto/generated/zitadel/member_pb'; import { ManagementService } from 'src/app/services/mgmt.service'; -import { ProjectType } from './project-members.component'; +export enum ProjectType { + PROJECTTYPE_OWNED = "OWNED", + PROJECTTYPE_GRANTED = "GRANTED" +} /** * Data source for the ProjectMembers view. This class should diff --git a/console/src/app/modules/project-members/project-members.component.ts b/console/src/app/modules/project-members/project-members.component.ts index d39153ae7a..d78b011666 100644 --- a/console/src/app/modules/project-members/project-members.component.ts +++ b/console/src/app/modules/project-members/project-members.component.ts @@ -11,12 +11,7 @@ import { ManagementService } from 'src/app/services/mgmt.service'; import { ToastService } from 'src/app/services/toast.service'; import { CreationType, MemberCreateDialogComponent } from '../add-member-dialog/member-create-dialog.component'; -import { ProjectMembersDataSource } from './project-members-datasource'; - -export enum ProjectType { - PROJECTTYPE_OWNED = "OWNED", - PROJECTTYPE_GRANTED = "GRANTED" -} +import { ProjectMembersDataSource, ProjectType } from './project-members-datasource'; @Component({ selector: 'app-project-members', diff --git a/console/src/app/modules/project-roles/project-roles.component.html b/console/src/app/modules/project-roles/project-roles.component.html index 95ed79c08e..3a8f52bc75 100644 --- a/console/src/app/modules/project-roles/project-roles.component.html +++ b/console/src/app/modules/project-roles/project-roles.component.html @@ -52,7 +52,8 @@ {{ 'PROJECT.ROLE.CREATIONDATE' | translate }} - {{role.creationDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }} + {{role.details.creationDate | timestampToDate | + localizedDate: 'dd. MMM, HH:mm' }} diff --git a/console/src/app/pages/home/home.component.html b/console/src/app/pages/home/home.component.html index 5aba76393c..d7f00b3f4e 100644 --- a/console/src/app/pages/home/home.component.html +++ b/console/src/app/pages/home/home.component.html @@ -1,13 +1,17 @@
- -

+

{{'HOME.WELCOME' | translate}}, - {{user?.displayName ? user.displayName : (user.firstName + ' '+ user.lastName)}}

-

{{user?.userName}}

+ {{user?.human?.profile?.displayName ? user.human?.profile?.displayName : (user.human?.profile?.firstName + ' + '+ user.human?.profile?.lastName)}} +

{{user?.human?.profile?.userName}}

{{'HOME.WELCOMESENTENCE' | translate}}

diff --git a/console/src/app/pages/iam/iam-members/iam-members.component.ts b/console/src/app/pages/iam/iam-members/iam-members.component.ts index c6d4257d72..9ecf017fc5 100644 --- a/console/src/app/pages/iam/iam-members/iam-members.component.ts +++ b/console/src/app/pages/iam/iam-members/iam-members.component.ts @@ -3,7 +3,6 @@ import { MatDialog } from '@angular/material/dialog'; import { PageEvent } from '@angular/material/paginator'; import { MatSelectChange } from '@angular/material/select'; import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component'; -import { ProjectType } from 'src/app/modules/project-members/project-members.component'; import { Member } from 'src/app/proto/generated/zitadel/member_pb'; import { User } from 'src/app/proto/generated/zitadel/user_pb'; import { AdminService } from 'src/app/services/admin.service'; @@ -18,7 +17,6 @@ import { IamMembersDataSource } from './iam-members-datasource'; }) export class IamMembersComponent { public INITIALPAGESIZE: number = 25; - public projectType: ProjectType = ProjectType.PROJECTTYPE_OWNED; public dataSource!: IamMembersDataSource; public memberRoleOptions: string[] = []; diff --git a/console/src/app/pages/orgs/org-create/org-create.component.html b/console/src/app/pages/orgs/org-create/org-create.component.html index 5da50bd098..5a89bc2276 100644 --- a/console/src/app/pages/orgs/org-create/org-create.component.html +++ b/console/src/app/pages/orgs/org-create/org-create.component.html @@ -116,8 +116,8 @@ [password]="password"> -
- + + {{ 'USER.PASSWORD.NEW' | translate }} @@ -127,7 +127,7 @@ - + {{ 'USER.PASSWORD.CONFIRM' | translate }} diff --git a/console/src/app/pages/orgs/org-create/org-create.component.scss b/console/src/app/pages/orgs/org-create/org-create.component.scss index 4d425341b9..eae70135fd 100644 --- a/console/src/app/pages/orgs/org-create/org-create.component.scss +++ b/console/src/app/pages/orgs/org-create/org-create.component.scss @@ -110,6 +110,17 @@ h1 { margin: 0 .5rem; } } + + .pwd-form { + display: flex; + flex-direction: row; + flex-wrap: wrap; + + .pwd { + flex: 1; + margin: 0 .5rem; + } + } } } diff --git a/console/src/app/pages/orgs/org-create/org-create.component.ts b/console/src/app/pages/orgs/org-create/org-create.component.ts index 0ec3e1e08b..f865d6cc53 100644 --- a/console/src/app/pages/orgs/org-create/org-create.component.ts +++ b/console/src/app/pages/orgs/org-create/org-create.component.ts @@ -95,7 +95,7 @@ export class OrgCreateComponent { createOrgRequest.setDomain(this.domain?.value); const humanRequest: SetUpOrgRequest.Human = new SetUpOrgRequest.Human(); - humanRequest.setEmail(this.email?.value); + humanRequest.setEmail(new SetUpOrgRequest.Human.Email().setEmail(this.email?.value)); humanRequest.setUserName(this.userName?.value); const profile: SetUpOrgRequest.Human.Profile = new SetUpOrgRequest.Human.Profile(); @@ -105,7 +105,7 @@ export class OrgCreateComponent { profile.setGender(this.gender?.value); profile.setPreferredLanguage(this.preferredLanguage?.value); - humanRequest.setProfile(this.firstName?.value); + humanRequest.setProfile(profile); if (this.usePassword && this.password) { humanRequest.setPassword(this.password?.value); } diff --git a/console/src/app/pages/orgs/org-detail/org-detail.component.html b/console/src/app/pages/orgs/org-detail/org-detail.component.html index 4cb8307c4c..e9c138895a 100644 --- a/console/src/app/pages/orgs/org-detail/org-detail.component.html +++ b/console/src/app/pages/orgs/org-detail/org-detail.component.html @@ -7,18 +7,18 @@ description="{{ 'ORG.DOMAINS.DESCRIPTION' | translate }}">
- {{domain.domain}} - {{domain.domain}} + {{domain.domainName}} + {{domain?.domainName}} - - - + + {{'ORG.DOMAINS.SETPRIMARY' | translate}}

{{'ORG.PAGES.ORGDOMAIN.VERIFICATION' | translate}}

diff --git a/console/src/app/pages/projects/apps/app-create/app-create.component.ts b/console/src/app/pages/projects/apps/app-create/app-create.component.ts index 8fdb0508cf..e932cfd26a 100644 --- a/console/src/app/pages/projects/apps/app-create/app-create.component.ts +++ b/console/src/app/pages/projects/apps/app-create/app-create.component.ts @@ -10,13 +10,17 @@ import { debounceTime, takeUntil } from 'rxjs/operators'; import { RadioItemAuthType } from 'src/app/modules/app-radio/app-auth-method-radio/app-auth-method-radio.component'; import { APIAuthMethodType, - App, OIDCAppType, OIDCAuthMethodType, OIDCGrantType, OIDCResponseType, } from 'src/app/proto/generated/zitadel/app_pb'; -import { AddAPIAppRequest, AddOIDCAppRequest } from 'src/app/proto/generated/zitadel/management_pb'; +import { + AddAPIAppRequest, + AddAPIAppResponse, + AddOIDCAppRequest, + AddOIDCAppResponse, +} from 'src/app/proto/generated/zitadel/management_pb'; import { ManagementService } from 'src/app/services/mgmt.service'; import { ToastService } from 'src/app/services/toast.service'; @@ -269,6 +273,7 @@ export class AppCreateComponent implements OnInit, OnDestroy { private async getData({ projectid }: Params): Promise { this.projectId = projectid; + console.log(this.projectId); this.oidcAppRequest.projectId = projectid; this.apiAppRequest.projectId = projectid; } @@ -289,11 +294,11 @@ export class AppCreateComponent implements OnInit, OnDestroy { .addOIDCApp(this.oidcAppRequest) .then((resp) => { this.loading = false; - // if (resp.oidcConfig?.authMethodType !== OIDCAuthMethodType.OIDCAUTHMETHODTYPE_NONE) { - // this.showSavedDialog(resp); - // } else { - // this.router.navigate(['projects', this.projectId, 'apps', response.id]); - // } + if (resp.clientId || resp.clientSecret) { + this.showSavedDialog(resp); + } else { + this.router.navigate(['projects', this.projectId, 'apps', resp.appId]); + } }) .catch(error => { this.loading = false; @@ -305,12 +310,12 @@ export class AppCreateComponent implements OnInit, OnDestroy { .addAPIApp(this.apiAppRequest) .then((resp) => { this.loading = false; - // const response = resp.toObject(); - // if (response.apiConfig?.authMethodType == APIAuthMethodType.APIAUTHMETHODTYPE_BASIC) { - // this.showSavedDialog(resp); - // } else { - // this.router.navigate(['projects', this.projectId, 'apps', response.id]); - // } + + if (resp.clientId || resp.clientSecret) { + this.showSavedDialog(resp); + } else { + this.router.navigate(['projects', this.projectId, 'apps', resp.appId]); + } }) .catch(error => { this.loading = false; @@ -319,27 +324,25 @@ export class AppCreateComponent implements OnInit, OnDestroy { } } - public showSavedDialog(app: App.AsObject): void { - if (app.oidcConfig?.clientSecret !== undefined) { - const dialogRef = this.dialog.open(AppSecretDialogComponent, { - data: app.oidcConfig, - }); - - dialogRef.afterClosed().subscribe(() => { - this.router.navigate(['projects', this.projectId, 'apps', app.id]); - }); + public showSavedDialog(added: AddOIDCAppResponse.AsObject | AddAPIAppResponse.AsObject): void { + let clientSecret = ''; + if (added.clientSecret) { + clientSecret = added.clientSecret; } - else if (app.apiConfig?.clientSecret !== undefined) { - const dialogRef = this.dialog.open(AppSecretDialogComponent, { - data: app.apiConfig, - }); - - dialogRef.afterClosed().subscribe(() => { - this.router.navigate(['projects', this.projectId, 'apps', app.id]); - }); - } else { - this.router.navigate(['projects', this.projectId, 'apps', app.id]); + let clientId = ''; + if (added.clientId) { + clientId = added.clientId; } + const dialogRef = this.dialog.open(AppSecretDialogComponent, { + data: { + clientSecret: clientSecret, + clientId: clientId + } + }); + + dialogRef.afterClosed().subscribe(() => { + this.router.navigate(['projects', this.projectId, 'apps', added.appId]); + }); } get name(): AbstractControl | null { diff --git a/console/src/app/pages/projects/apps/app-detail/app-detail.component.html b/console/src/app/pages/projects/apps/app-detail/app-detail.component.html index bac4068bf5..beb88925ad 100644 --- a/console/src/app/pages/projects/apps/app-detail/app-detail.component.html +++ b/console/src/app/pages/projects/apps/app-detail/app-detail.component.html @@ -180,7 +180,7 @@ {{ 'APP.TYPE' | translate }} - + {{ 'APP.OIDC.APPTYPE.'+type | translate }} diff --git a/console/src/app/pages/projects/granted-projects/granted-project-detail/granted-project-detail.component.ts b/console/src/app/pages/projects/granted-projects/granted-project-detail/granted-project-detail.component.ts index bf93b74d89..0d4f876a57 100644 --- a/console/src/app/pages/projects/granted-projects/granted-project-detail/granted-project-detail.component.ts +++ b/console/src/app/pages/projects/granted-projects/granted-project-detail/granted-project-detail.component.ts @@ -7,7 +7,6 @@ import { BehaviorSubject, from, Observable, of, Subscription } from 'rxjs'; import { catchError, finalize, map } from 'rxjs/operators'; import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component'; import { ChangeType } from 'src/app/modules/changes/changes.component'; -import { ProjectType } from 'src/app/modules/project-members/project-members.component'; import { UserGrantContext } from 'src/app/modules/user-grants/user-grants-datasource'; import { Member } from 'src/app/proto/generated/zitadel/member_pb'; import { GrantedProject, ProjectState } from 'src/app/proto/generated/zitadel/project_pb'; @@ -26,7 +25,6 @@ export class GrantedProjectDetailComponent implements OnInit, OnDestroy { public project!: GrantedProject.AsObject; public ProjectState: any = ProjectState; - public ProjectType: any = ProjectType; public ChangeType: any = ChangeType; private subscription?: Subscription; diff --git a/console/src/app/pages/projects/granted-projects/granted-project-list/granted-project-grid/granted-project-grid.component.ts b/console/src/app/pages/projects/granted-projects/granted-project-list/granted-project-grid/granted-project-grid.component.ts index 371a66ab43..b8d69a7e5a 100644 --- a/console/src/app/pages/projects/granted-projects/granted-project-list/granted-project-grid/granted-project-grid.component.ts +++ b/console/src/app/pages/projects/granted-projects/granted-project-list/granted-project-grid/granted-project-grid.component.ts @@ -2,7 +2,6 @@ import { animate, animateChild, query, stagger, style, transition, trigger } fro import { SelectionModel } from '@angular/cdk/collections'; import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; import { Router } from '@angular/router'; -import { ProjectType } from 'src/app/modules/project-members/project-members.component'; import { Org } from 'src/app/proto/generated/zitadel/org_pb'; import { GrantedProject, ProjectState } from 'src/app/proto/generated/zitadel/project_pb'; import { StorageKey, StorageService } from 'src/app/services/storage.service'; @@ -41,7 +40,6 @@ export class GrantedProjectGridComponent implements OnChanges { public showNewProject: boolean = false; public ProjectState: any = ProjectState; - public ProjectType: any = ProjectType; constructor(private storage: StorageService, private router: Router) { this.selection.changed.subscribe(selection => { diff --git a/console/src/app/pages/projects/granted-projects/granted-projects-routing.module.ts b/console/src/app/pages/projects/granted-projects/granted-projects-routing.module.ts index ad3c492ba9..5d0eb734df 100644 --- a/console/src/app/pages/projects/granted-projects/granted-projects-routing.module.ts +++ b/console/src/app/pages/projects/granted-projects/granted-projects-routing.module.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { AuthGuard } from 'src/app/guards/auth.guard'; import { RoleGuard } from 'src/app/guards/role.guard'; -import { ProjectType } from 'src/app/modules/project-members/project-members.component'; +import { ProjectType } from 'src/app/modules/project-members/project-members-datasource'; import { GrantedProjectDetailComponent } from './granted-project-detail/granted-project-detail.component'; import { GrantedProjectsComponent } from './granted-projects.component'; diff --git a/console/src/app/pages/projects/owned-projects/owned-project-detail/application-grid/application-grid.component.html b/console/src/app/pages/projects/owned-projects/owned-project-detail/application-grid/application-grid.component.html index 10dbf1ff1d..a8ce1a2f11 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-detail/application-grid/application-grid.component.html +++ b/console/src/app/pages/projects/owned-projects/owned-project-detail/application-grid/application-grid.component.html @@ -11,23 +11,20 @@
- + {{ app.name.charAt(0)}} - - - - + + + + + + {{app.name}} - - {{'APP.OIDC.APPTYPE.'+app.oidcConfig?.applicationType | translate}} + + {{'APP.OIDC.APPTYPE.'+app.oidcConfig?.appType | translate}} API
diff --git a/console/src/app/pages/projects/owned-projects/owned-project-detail/application-grid/application-grid.component.ts b/console/src/app/pages/projects/owned-projects/owned-project-detail/application-grid/application-grid.component.ts index 9303519ee4..2b2d9205d2 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-detail/application-grid/application-grid.component.ts +++ b/console/src/app/pages/projects/owned-projects/owned-project-detail/application-grid/application-grid.component.ts @@ -1,11 +1,9 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { BehaviorSubject, from, Observable, of } from 'rxjs'; -import { catchError, finalize, map } from 'rxjs/operators'; +import { BehaviorSubject, from, Observable } from 'rxjs'; +import { finalize, map } from 'rxjs/operators'; import { App, OIDCAppType } from 'src/app/proto/generated/zitadel/app_pb'; import { ManagementService } from 'src/app/services/mgmt.service'; -import { NATIVE_TYPE, USER_AGENT_TYPE, WEB_TYPE } from '../../../apps/authtypes'; - @Component({ selector: 'app-application-grid', templateUrl: './application-grid.component.html', @@ -18,11 +16,7 @@ export class ApplicationGridComponent implements OnInit { public appsSubject: BehaviorSubject = new BehaviorSubject([]); private loadingSubject: BehaviorSubject = new BehaviorSubject(true); public loading$: Observable = this.loadingSubject.asObservable(); - public OIDCApplicationType: any = OIDCAppType; - - public NATIVE_TYPE: any = NATIVE_TYPE; - public WEB_TYPE: any = WEB_TYPE; - public USER_AGENT_TYPE: any = USER_AGENT_TYPE; + public OIDCAppType: any = OIDCAppType; constructor(private mgmtService: ManagementService) { } @@ -33,11 +27,13 @@ export class ApplicationGridComponent implements OnInit { public loadApps(): void { from(this.mgmtService.listApps(this.projectId, 100, 0)).pipe( map(resp => { + console.log(resp.resultList); return resp.resultList; }), - catchError(() => of([])), + // catchError(() => of([])), finalize(() => this.loadingSubject.next(false)), ).subscribe((apps) => { + console.log(apps); this.appsSubject.next(apps as App.AsObject[]); }); } diff --git a/console/src/app/pages/projects/owned-projects/owned-project-detail/owned-project-detail.component.html b/console/src/app/pages/projects/owned-projects/owned-project-detail/owned-project-detail.component.html index c2c6adfd23..c4436c0f6d 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-detail/owned-project-detail.component.html +++ b/console/src/app/pages/projects/owned-projects/owned-project-detail/owned-project-detail.component.html @@ -23,13 +23,13 @@
@@ -67,8 +67,7 @@ - + {{'PROJECT.STATE.TITLE' | translate}}: {{'PROJECT.STATE.'+project.state + [ngClass]="{'active': project.state === ProjectState.PROJECT_STATE_ACTIVE, 'inactive': project.state === ProjectState.PROJECT_STATE_INACTIVE}">{{'PROJECT.STATE.'+project.state | translate}}
@@ -139,4 +138,4 @@
- + \ No newline at end of file diff --git a/console/src/app/pages/projects/owned-projects/owned-project-detail/owned-project-detail.component.ts b/console/src/app/pages/projects/owned-projects/owned-project-detail/owned-project-detail.component.ts index 002a3a175c..e6e705764b 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-detail/owned-project-detail.component.ts +++ b/console/src/app/pages/projects/owned-projects/owned-project-detail/owned-project-detail.component.ts @@ -8,7 +8,6 @@ import { BehaviorSubject, from, Observable, of, Subscription } from 'rxjs'; import { catchError, finalize, map } from 'rxjs/operators'; import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component'; import { ChangeType } from 'src/app/modules/changes/changes.component'; -import { ProjectType } from 'src/app/modules/project-members/project-members.component'; import { UserGrantContext } from 'src/app/modules/user-grants/user-grants-datasource'; import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component'; import { App } from 'src/app/proto/generated/zitadel/app_pb'; @@ -35,7 +34,6 @@ export class OwnedProjectDetailComponent implements OnInit, OnDestroy { public appsColumns: string[] = ['name']; public ProjectState: any = ProjectState; - public ProjectType: any = ProjectType; public ChangeType: any = ChangeType; public grid: boolean = true; diff --git a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-grid/owned-project-grid.component.html b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-grid/owned-project-grid.component.html index fa9b85661b..c5f3378574 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-grid/owned-project-grid.component.html +++ b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-grid/owned-project-grid.component.html @@ -10,19 +10,19 @@

{{'PROJECT.PAGES.PINNED' | translate}}

+ (click)="navigateToProject(item.id, $event)" + [ngClass]="{ inactive: item.state !== ProjectState.PROJECT_STATE_ACTIVE}">
{{'PROJECT.PAGES.LASTMODIFIED' | translate}} {{ - item.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' - }} + item.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' + }} {{ item.name }} {{'PROJECT.PAGES.CREATEDON' | translate}} {{ - item.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' - }} + item.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' + }}
@@ -34,20 +34,19 @@

{{'PROJECT.PAGES.ALL' | translate}}

-
+
- {{'PROJECT.PAGES.LASTMODIFIED' | translate}} + {{'PROJECT.PAGES.LASTMODIFIED' | translate}} {{ - item.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' - }} + item.details.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' + }} {{ item.name }} - {{'PROJECT.PAGES.CREATEDON' | translate}} + {{'PROJECT.PAGES.CREATEDON' | translate}} {{ - item.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' - }} + item.details.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm' + }}
@@ -66,7 +65,7 @@
- diff --git a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-grid/owned-project-grid.component.ts b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-grid/owned-project-grid.component.ts index d5759c7047..5c09f51934 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-grid/owned-project-grid.component.ts +++ b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-grid/owned-project-grid.component.ts @@ -3,7 +3,6 @@ import { SelectionModel } from '@angular/cdk/collections'; import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; -import { ProjectType } from 'src/app/modules/project-members/project-members.component'; import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component'; import { Org } from 'src/app/proto/generated/zitadel/org_pb'; import { Project, ProjectState } from 'src/app/proto/generated/zitadel/project_pb'; @@ -51,7 +50,6 @@ export class OwnedProjectGridComponent implements OnChanges { public showNewProject: boolean = false; public ProjectState: any = ProjectState; - public ProjectType: any = ProjectType; @Input() public zitadelProjectId: string = ''; constructor( private router: Router, diff --git a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.html b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.html index 23ccdf36e8..9b98c10c4d 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.html +++ b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.html @@ -41,16 +41,16 @@ {{ 'PROJECT.TABLE.STATE' | translate }} - {{'PROJECT.STATE.'+project.state | translate}} + {{'PROJECT.STATE.'+project.state + | translate}} {{ 'PROJECT.TABLE.CREATIONDATE' | translate }} - {{project.creationDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm'}} + {{project.details.creationDate | timestampToDate | + localizedDate: 'EEE dd. MMM, HH:mm'}} @@ -58,8 +58,8 @@ {{ 'PROJECT.TABLE.CHANGEDATE' | translate }} - {{project.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm'}} + {{project.details.changeDate | timestampToDate | + localizedDate: 'EEE dd. MMM, HH:mm'}} diff --git a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.spec.ts b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.spec.ts index b3e674caf3..8d42561826 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.spec.ts +++ b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.spec.ts @@ -1,20 +1,20 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { GrantedProjectListComponent } from './granted-project-list.component'; +import { OwnedProjectListComponent } from './owned-project-list.component'; -describe('ProjectListComponent', () => { - let component: GrantedProjectListComponent; - let fixture: ComponentFixture; +describe('OwnedProjectListComponent', () => { + let component: OwnedProjectListComponent; + let fixture: ComponentFixture; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [GrantedProjectListComponent], + declarations: [OwnedProjectListComponent], }) .compileComponents(); })); beforeEach(() => { - fixture = TestBed.createComponent(GrantedProjectListComponent); + fixture = TestBed.createComponent(OwnedProjectListComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.ts b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.ts index a6e38d2ca8..a341225ac6 100644 --- a/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.ts +++ b/console/src/app/pages/projects/owned-projects/owned-project-list/owned-project-list.component.ts @@ -109,6 +109,7 @@ export class OwnedProjectListComponent implements OnInit, OnDestroy { private async getData(limit?: number, offset?: number): Promise { this.loadingSubject.next(true); this.mgmtService.listProjects(limit, offset).then(resp => { + console.log(resp.resultList); this.ownedProjectList = resp.resultList; if (resp.details?.totalResult) { this.totalResult = resp.details.totalResult; diff --git a/console/src/app/pages/projects/owned-projects/owned-projects-routing.module.ts b/console/src/app/pages/projects/owned-projects/owned-projects-routing.module.ts index 12b1e6cfca..f617183b53 100644 --- a/console/src/app/pages/projects/owned-projects/owned-projects-routing.module.ts +++ b/console/src/app/pages/projects/owned-projects/owned-projects-routing.module.ts @@ -1,7 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { RoleGuard } from 'src/app/guards/role.guard'; -import { ProjectType } from 'src/app/modules/project-members/project-members.component'; +import { ProjectType } from 'src/app/modules/project-members/project-members-datasource'; import { OwnedProjectsComponent } from './owned-projects.component'; diff --git a/console/src/app/pages/projects/owned-projects/project-grant-detail/project-grant-detail.component.ts b/console/src/app/pages/projects/owned-projects/project-grant-detail/project-grant-detail.component.ts index 442b7d774d..c1afca6bc4 100644 --- a/console/src/app/pages/projects/owned-projects/project-grant-detail/project-grant-detail.component.ts +++ b/console/src/app/pages/projects/owned-projects/project-grant-detail/project-grant-detail.component.ts @@ -3,7 +3,6 @@ import { MatDialog } from '@angular/material/dialog'; import { PageEvent } from '@angular/material/paginator'; import { MatSelectChange } from '@angular/material/select'; import { ActivatedRoute } from '@angular/router'; -import { ProjectType } from 'src/app/modules/project-members/project-members.component'; import { Member } from 'src/app/proto/generated/zitadel/member_pb'; import { GrantedProject, ProjectGrantState, Role } from 'src/app/proto/generated/zitadel/project_pb'; import { ManagementService } from 'src/app/services/mgmt.service'; @@ -27,7 +26,6 @@ export class ProjectGrantDetailComponent { public projectid: string = ''; public grantid: string = ''; - public projectType: ProjectType = ProjectType.PROJECTTYPE_OWNED; public disabled: boolean = false; public isZitadel: boolean = false; diff --git a/console/src/app/pages/users/user-create/user-create.component.html b/console/src/app/pages/users/user-create/user-create.component.html index 51e9c9c8ba..2995272735 100644 --- a/console/src/app/pages/users/user-create/user-create.component.html +++ b/console/src/app/pages/users/user-create/user-create.component.html @@ -19,7 +19,7 @@ {{ 'USER.PROFILE.USERNAME' | translate }}* - {{envSuffixLabel}} + {{envSuffixLabel}} {{ 'USER.VALIDATION.REQUIRED' | translate }} @@ -88,8 +88,8 @@
- +
\ No newline at end of file diff --git a/console/src/app/pages/users/user-create/user-create.component.ts b/console/src/app/pages/users/user-create/user-create.component.ts index e3198a0e58..8635466350 100644 --- a/console/src/app/pages/users/user-create/user-create.component.ts +++ b/console/src/app/pages/users/user-create/user-create.component.ts @@ -1,7 +1,9 @@ import { ChangeDetectorRef, Component, OnDestroy, ViewChild } from '@angular/core'; import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Router } from '@angular/router'; -import { Subscription } from 'rxjs'; +import parsePhoneNumber from 'libphonenumber-js'; +import { Subject } from 'rxjs'; +import { debounceTime, takeUntil } from 'rxjs/operators'; import { AddHumanUserRequest } from 'src/app/proto/generated/zitadel/management_pb'; import { Domain } from 'src/app/proto/generated/zitadel/org_pb'; import { Gender } from 'src/app/proto/generated/zitadel/user_pb'; @@ -37,7 +39,7 @@ export class UserCreateComponent implements OnDestroy { public languages: string[] = ['de', 'en']; public userForm!: FormGroup; public envSuffixLabel: string = ''; - private sub: Subscription = new Subscription(); + private destroyed$: Subject = new Subject(); public userLoginMustBeDomain: boolean = false; public loading: boolean = false; @@ -92,15 +94,23 @@ export class UserCreateComponent implements OnDestroy { firstName: ['', Validators.required], lastName: ['', Validators.required], nickName: [''], - gender: [Gender.GENDER_UNSPECIFIED], + gender: [], preferredLanguage: [''], phone: [''], }); - } - - public logsuff(): void { - console.log((this.suffix.nativeElement as HTMLElement), (this.suffix.nativeElement as HTMLElement).offsetWidth); + this.userForm.controls['phone'].valueChanges.pipe( + takeUntil(this.destroyed$), + debounceTime(300)).subscribe(value => { + const phoneNumber = parsePhoneNumber(value ?? '', 'CH'); + if (phoneNumber) { + const formmatted = phoneNumber.formatInternational(); + const country = phoneNumber.country; + if (this.phone && country && this.phone.value && this.phone.value !== formmatted) { + this.phone.setValue(formmatted); + } + } + }); } public createUser(): void { @@ -119,8 +129,11 @@ export class UserCreateComponent implements OnDestroy { humanReq.setUserName(this.userName?.value); humanReq.setProfile(profileReq); - humanReq.setEmail(this.email?.value); - humanReq.setPhone(this.phone?.value); + humanReq.setEmail(new AddHumanUserRequest.Email().setEmail(this.email?.value)); + + if (this.phone && this.phone.value) { + humanReq.setPhone(new AddHumanUserRequest.Phone().setPhone(this.phone.value)); + } this.mgmtService .addHumanUser(humanReq) @@ -136,7 +149,8 @@ export class UserCreateComponent implements OnDestroy { } ngOnDestroy(): void { - this.sub.unsubscribe(); + this.destroyed$.next(); + this.destroyed$.complete(); } public get email(): AbstractControl | null { diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.html b/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.html new file mode 100644 index 0000000000..4c62c5f259 --- /dev/null +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.html @@ -0,0 +1,50 @@ +

+ {{'USER.CODEDIALOG.TITLE' | translate}} {{data?.number}} +

+

{{'USER.CODEDIALOG.DESCRIPTION' | translate}}

+
+
+ + +
+ +
+

{{'USER.MFA.OTP_DIALOG_DESCRIPTION' | translate}}

+
+ +
+ + + Code + + +
+ +
+

{{'USER.MFA.U2F_DIALOG_DESCRIPTION' | translate}}

+ + + {{'USER.MFA.U2F_NAME' | translate}} + + + + + +

{{u2fError}}

+
+
+
+ + + +
\ No newline at end of file diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.scss b/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.scss new file mode 100644 index 0000000000..bb7bcbff0e --- /dev/null +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.scss @@ -0,0 +1,35 @@ +.type-selection { + display: flex; + margin: 0 -0.5rem; + + .otp, + .u2f { + flex: 1; + min-height: 100px; + border-radius: .5rem; + border: 1px solid var(--grey); + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 1rem; + margin: .5rem; + } +} + +.formfield { + width: 100%; +} + +.action { + display: flex; + justify-content: flex-end; + + .ok-button { + margin-left: .5rem; + } + + button { + border-radius: .5rem; + } +} diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.spec.ts b/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.spec.ts new file mode 100644 index 0000000000..60820bb6b8 --- /dev/null +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; + +import { AuthFactorDialogComponent } from './auth-factor-dialog.component'; + +describe('CodeDialogComponent', () => { + let component: AuthFactorDialogComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [AuthFactorDialogComponent], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AuthFactorDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.ts new file mode 100644 index 0000000000..fcaf0cbebe --- /dev/null +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-factor-dialog/auth-factor-dialog.component.ts @@ -0,0 +1,138 @@ +import { Component, Inject } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { TranslateService } from '@ngx-translate/core'; +import { take } from 'rxjs/operators'; +import { GrpcAuthService } from 'src/app/services/grpc-auth.service'; +import { ToastService } from 'src/app/services/toast.service'; + +import { _base64ToArrayBuffer } from '../../u2f-util'; +import { _arrayBufferToBase64 } from '../u2f_util'; + +export enum AuthFactorType { + OTP, + U2F, +} + +@Component({ + selector: 'app-auth-factor-dialog', + templateUrl: './auth-factor-dialog.component.html', + styleUrls: ['./auth-factor-dialog.component.scss'], +}) +export class AuthFactorDialogComponent { + public otpurl: string = ''; + public otpcode: string = ''; + + public u2fname: string = ''; + public u2fCredentialOptions!: CredentialCreationOptions; + public u2fLoading: boolean = false; + public u2fError: string = ''; + + AuthFactorType: any = AuthFactorType; + selectedType!: AuthFactorType; + constructor( + private authService: GrpcAuthService, + private toast: ToastService, + private translate: TranslateService, + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any, + ) { } + + closeDialog(code: string = ''): void { + this.dialogRef.close(code); + } + + public selectType(type: AuthFactorType): void { + if (type == AuthFactorType.OTP) { + this.authService.addMyMultiFactorOTP().then((otpresp) => { + this.otpurl = otpresp.url; + }, error => { + this.toast.showError(error); + }); + } else if (type == AuthFactorType.U2F) { + this.authService.addMyMultiFactorU2F().then((u2fresp) => { + const credOptions: CredentialCreationOptions = JSON.parse(atob(u2fresp.key?.publicKey as string)); + + if (credOptions.publicKey?.challenge) { + credOptions.publicKey.challenge = _base64ToArrayBuffer(credOptions.publicKey.challenge as any); + credOptions.publicKey.user.id = _base64ToArrayBuffer(credOptions.publicKey.user.id as any); + if (credOptions.publicKey.excludeCredentials) { + credOptions.publicKey.excludeCredentials.map(cred => { + cred.id = _base64ToArrayBuffer(cred.id as any); + return cred; + }); + } + this.u2fCredentialOptions = credOptions; + } + + }, error => { + this.toast.showError(error); + }); + } + } + + public submitAuth() { + if (this.selectedType == AuthFactorType.OTP) { + this.submitOTP(); + } else if (this.selectedType == AuthFactorType.U2F) { + this.submitU2F(); + } + } + + public submitOTP(): void { + this.authService.verifyMyMultiFactorOTP(this.otpcode).then(() => { + this.dialogRef.close(true); + }, error => { + this.dialogRef.close(false); + }); + } + + public submitU2F(): void { + if (this.u2fname && this.u2fCredentialOptions.publicKey) { + // this.data.credOptions.publicKey.rp.id = 'localhost'; + navigator.credentials.create(this.data.credOptions).then((resp) => { + if (resp && + (resp as any).response.attestationObject && + (resp as any).response.clientDataJSON && + (resp as any).rawId) { + + const attestationObject = (resp as any).response.attestationObject; + const clientDataJSON = (resp as any).response.clientDataJSON; + const rawId = (resp as any).rawId; + + const data = JSON.stringify({ + id: resp.id, + rawId: _arrayBufferToBase64(rawId), + type: resp.type, + response: { + attestationObject: _arrayBufferToBase64(attestationObject), + clientDataJSON: _arrayBufferToBase64(clientDataJSON), + }, + }); + + const base64 = btoa(data); + + this.authService.verifyMyMultiFactorU2F(base64, this.u2fname).then(() => { + this.translate.get('USER.MFA.U2F_SUCCESS').pipe(take(1)).subscribe(msg => { + this.toast.showInfo(msg); + }); + this.dialogRef.close(true); + this.u2fLoading = false; + }).catch(error => { + this.u2fLoading = false; + this.toast.showError(error); + }); + } else { + this.u2fLoading = false; + this.translate.get('USER.MFA.U2F_ERROR').pipe(take(1)).subscribe(msg => { + this.toast.showInfo(msg); + }); + this.dialogRef.close(true); + } + }).catch(error => { + this.u2fLoading = false; + this.u2fError = error; + this.toast.showInfo(error.message); + }); + } + } +} diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.html b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.html index 9131ff01a8..436b13788a 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.html +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.html @@ -27,9 +27,10 @@
- - + + diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts index 5e32e29e8d..6b196bbf5b 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts @@ -8,8 +8,7 @@ import { Email, Gender, Phone, Profile, User, UserState } from 'src/app/proto/ge import { GrpcAuthService } from 'src/app/services/grpc-auth.service'; import { ToastService } from 'src/app/services/toast.service'; -import { EditDialogType } from '../user-detail/user-detail.component'; -import { EditDialogComponent } from './edit-dialog/edit-dialog.component'; +import { EditDialogComponent, EditDialogType } from './edit-dialog/edit-dialog.component'; @Component({ selector: 'app-auth-user-detail', @@ -169,7 +168,7 @@ export class AuthUserDetailComponent implements OnDestroy { labelKey: 'ACTIONS.NEWVALUE', titleKey: 'USER.LOGINMETHODS.PHONE.EDITTITLE', descriptionKey: 'USER.LOGINMETHODS.PHONE.EDITDESC', - value: this.user.human?.phone, + value: this.user.human?.phone?.phone, }, width: '400px', }); @@ -188,7 +187,7 @@ export class AuthUserDetailComponent implements OnDestroy { labelKey: 'ACTIONS.NEWVALUE', titleKey: 'USER.LOGINMETHODS.EMAIL.EDITTITLE', descriptionKey: 'USER.LOGINMETHODS.EMAIL.EDITDESC', - value: this.user.human?.email, + value: this.user.human?.email?.email, }, width: '400px', }); diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.html b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.html index 107a428135..3bdc171f65 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.html +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.html @@ -39,14 +39,10 @@
- -
diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.ts index 26bd3afdb9..b40a413ca5 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.ts +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.ts @@ -8,9 +8,7 @@ import { AuthFactor, AuthFactorState } from 'src/app/proto/generated/zitadel/use import { GrpcAuthService } from 'src/app/services/grpc-auth.service'; import { ToastService } from 'src/app/services/toast.service'; -import { _base64ToArrayBuffer } from '../../u2f-util'; -import { DialogOtpComponent } from '../dialog-otp/dialog-otp.component'; -import { DialogU2FComponent, U2FComponentDestination } from '../dialog-u2f/dialog-u2f.component'; +import { AuthFactorDialogComponent } from '../auth-factor-dialog/auth-factor-dialog.component'; export interface WebAuthNOptions { challenge: string; @@ -55,59 +53,17 @@ export class AuthUserMfaComponent implements OnInit, OnDestroy { this.loadingSubject.complete(); } - public addOTP(): void { - this.service.addMyMultiFactorOTP().then((otpresp) => { - const otp = otpresp; - const dialogRef = this.dialog.open(DialogOtpComponent, { - data: otp.url, - width: '400px', - }); - - dialogRef.afterClosed().subscribe((code) => { - if (code) { - this.service.verifyMyMultiFactorOTP(code).then(() => { - this.getMFAs(); - }); - } - }); - }, error => { - this.toast.showError(error); + public addAuthFactor(): void { + const dialogRef = this.dialog.open(AuthFactorDialogComponent, { + width: '400px', }); - } - public addU2F(): void { - this.service.addMyMultiFactorU2F().then((u2fresp) => { - const credOptions: CredentialCreationOptions = JSON.parse(atob(u2fresp.key?.publicKey as string)); - - if (credOptions.publicKey?.challenge) { - credOptions.publicKey.challenge = _base64ToArrayBuffer(credOptions.publicKey.challenge as any); - credOptions.publicKey.user.id = _base64ToArrayBuffer(credOptions.publicKey.user.id as any); - if (credOptions.publicKey.excludeCredentials) { - credOptions.publicKey.excludeCredentials.map(cred => { - cred.id = _base64ToArrayBuffer(cred.id as any); - return cred; - }); - } - console.log(credOptions); - const dialogRef = this.dialog.open(DialogU2FComponent, { - width: '400px', - data: { - credOptions, - type: U2FComponentDestination.MFA, - }, - }); - - dialogRef.afterClosed().subscribe(done => { - if (done) { - this.getMFAs(); - } else { - this.getMFAs(); - } + dialogRef.afterClosed().subscribe((code) => { + if (code) { + this.service.verifyMyMultiFactorOTP(code).then(() => { + this.getMFAs(); }); } - - }, error => { - this.toast.showError(error); }); } diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/dialog-otp/dialog-otp.component.html b/console/src/app/pages/users/user-detail/auth-user-detail/dialog-otp/dialog-otp.component.html deleted file mode 100644 index 0d5aa2426b..0000000000 --- a/console/src/app/pages/users/user-detail/auth-user-detail/dialog-otp/dialog-otp.component.html +++ /dev/null @@ -1,18 +0,0 @@ -

{{'USER.MFA.OTP_DIALOG_TITLE' | translate}}

-
-

{{'USER.MFA.OTP_DIALOG_DESCRIPTION' | translate}}

-
- -
- - - Code - - -
-
- - -
diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/dialog-otp/dialog-otp.component.scss b/console/src/app/pages/users/user-detail/auth-user-detail/dialog-otp/dialog-otp.component.scss deleted file mode 100644 index 96cfeae42e..0000000000 --- a/console/src/app/pages/users/user-detail/auth-user-detail/dialog-otp/dialog-otp.component.scss +++ /dev/null @@ -1,22 +0,0 @@ -.qrcode-wrapper { - display: flex; - align-content: center; - - .qrcode { - margin: 1rem auto; - } -} - -.form-field { - width: 100%; -} - -.action { - display: flex; - justify-content: flex-end; - - button { - margin-left: .5rem; - border-radius: .5rem; - } -} diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/dialog-otp/dialog-otp.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/dialog-otp/dialog-otp.component.ts deleted file mode 100644 index 47493a9ec9..0000000000 --- a/console/src/app/pages/users/user-detail/auth-user-detail/dialog-otp/dialog-otp.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component, Inject } from '@angular/core'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; - -@Component({ - selector: 'app-dialog-otp', - templateUrl: './dialog-otp.component.html', - styleUrls: ['./dialog-otp.component.scss'], -}) -export class DialogOtpComponent { - public code: string = ''; - constructor(public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: string) { } - - public closeDialog(): void { - this.dialogRef.close(); - } - - public closeDialogWithCode(): void { - this.dialogRef.close(this.code); - } -} diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/dialog-u2f/dialog-u2f.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/dialog-u2f/dialog-u2f.component.ts index 764b57f7bc..6974150e59 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/dialog-u2f/dialog-u2f.component.ts +++ b/console/src/app/pages/users/user-detail/auth-user-detail/dialog-u2f/dialog-u2f.component.ts @@ -5,17 +5,7 @@ import { take } from 'rxjs/operators'; import { GrpcAuthService } from 'src/app/services/grpc-auth.service'; import { ToastService } from 'src/app/services/toast.service'; -export function _arrayBufferToBase64(buffer: any): string { - let binary = ''; - const bytes = new Uint8Array(buffer); - const len = bytes.byteLength; - for (let i = 0; i < len; i++) { - binary += String.fromCharCode(bytes[i]); - } - return btoa(binary).replace(/\+/g, '-') - .replace(/\//g, '_') - .replace(/=/g, ''); -} +import { _arrayBufferToBase64 } from '../u2f_util'; export enum U2FComponentDestination { MFA = 'mfa', diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.html b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.html index 81ded0f7ef..81628ab3e0 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.html +++ b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.html @@ -4,8 +4,9 @@

{{data.descriptionKey | translate}}

- {{data.labelKey | translate }} - + {{data.labelKey | translate }} ({{ phoneCountry }}) +
diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.ts index 6ee5ecde6e..4044918319 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.ts +++ b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.ts @@ -1,5 +1,11 @@ import { Component, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { parsePhoneNumber } from 'libphonenumber-js'; + +export enum EditDialogType { + PHONE = 1, + EMAIL = 2, +} @Component({ selector: 'app-edit-email-dialog', @@ -8,9 +14,26 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; }) export class EditDialogComponent { public value: string = ''; + public isPhone: boolean = false; + public phoneCountry: string = 'CH'; constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any) { this.value = data.value; + if (data.type == EditDialogType.PHONE) { + this.isPhone = true; + } + } + + changeValue(change: any) { + const value = change.target.value; + if (this.isPhone && value) { + const phoneNumber = parsePhoneNumber(value ?? '', 'CH'); + if (phoneNumber) { + const formmatted = phoneNumber.formatInternational(); + this.phoneCountry = phoneNumber.country || ''; + this.value = formmatted; + } + } } closeDialog(email: string = ''): void { diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/u2f_util.ts b/console/src/app/pages/users/user-detail/auth-user-detail/u2f_util.ts new file mode 100644 index 0000000000..2c87cba61d --- /dev/null +++ b/console/src/app/pages/users/user-detail/auth-user-detail/u2f_util.ts @@ -0,0 +1,12 @@ + +export function _arrayBufferToBase64(buffer: any): string { + let binary = ''; + const bytes = new Uint8Array(buffer); + const len = bytes.byteLength; + for (let i = 0; i < len; i++) { + binary += String.fromCharCode(bytes[i]); + } + return btoa(binary).replace(/\+/g, '-') + .replace(/\//g, '_') + .replace(/=/g, ''); +} \ No newline at end of file diff --git a/console/src/app/pages/users/user-detail/contact/contact.component.html b/console/src/app/pages/users/user-detail/contact/contact.component.html index 37ec6979cb..2cc2008ebf 100644 --- a/console/src/app/pages/users/user-detail/contact/contact.component.html +++ b/console/src/app/pages/users/user-detail/contact/contact.component.html @@ -18,10 +18,10 @@
{{ 'USER.EMAIL' | translate }} - {{human?.email}} - {{'USER.EMAILVERIFIED' | + {{human?.email?.email}} + {{'USER.EMAILVERIFIED' | translate}} -
+
{{'USER.NOTVERIFIED' | translate}} @@ -45,13 +45,13 @@
{{ 'USER.PHONE' | translate }} - {{human?.phone ? human.phone : ('USER.PHONEEMPTY' | translate)}} - {{'USER.PHONEVERIFIED' | + {{human?.phone?.phone ? human.phone?.phone : ('USER.PHONEEMPTY' | translate)}} + {{'USER.PHONEVERIFIED' | translate}} -
+
{{'USER.NOTVERIFIED' | translate}} - + {{'USER.LOGINMETHODS.ENTERCODE' | translate}} @@ -64,7 +64,7 @@
- diff --git a/console/src/app/pages/users/user-detail/contact/contact.component.ts b/console/src/app/pages/users/user-detail/contact/contact.component.ts index bce28bd9ac..ce7d4a28fe 100644 --- a/console/src/app/pages/users/user-detail/contact/contact.component.ts +++ b/console/src/app/pages/users/user-detail/contact/contact.component.ts @@ -4,7 +4,7 @@ import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.com import { Human, UserState } from 'src/app/proto/generated/zitadel/user_pb'; import { CodeDialogComponent } from '../auth-user-detail/code-dialog/code-dialog.component'; -import { EditDialogType } from '../user-detail/user-detail.component'; +import { EditDialogType } from '../auth-user-detail/edit-dialog/edit-dialog.component'; @Component({ selector: 'app-contact', diff --git a/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts b/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts index dad4fad301..0251833bf8 100644 --- a/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts +++ b/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnChanges, OnDestroy, Output } from '@angular/core'; import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Subscription } from 'rxjs'; -import { Gender, User } from 'src/app/proto/generated/zitadel/user_pb'; +import { Gender, Human, User } from 'src/app/proto/generated/zitadel/user_pb'; @Component({ @@ -11,7 +11,7 @@ import { Gender, User } from 'src/app/proto/generated/zitadel/user_pb'; }) export class DetailFormComponent implements OnDestroy, OnChanges { @Input() public username!: string; - @Input() public user!: User; + @Input() public user!: Human.AsObject; @Input() public disabled: boolean = false; @Input() public genders: Gender[] = []; @Input() public languages: string[] = ['de', 'en']; @@ -47,7 +47,7 @@ export class DetailFormComponent implements OnDestroy, OnChanges { preferredLanguage: [{ value: '', disabled: this.disabled }], }); - this.profileForm.patchValue({ userName: this.username, ...this.user }); + this.profileForm.patchValue({ userName: this.username, ...this.user.profile }); if (this.preferredLanguage) { this.sub = this.preferredLanguage.valueChanges.subscribe(value => { diff --git a/console/src/app/pages/users/user-detail/user-detail.module.ts b/console/src/app/pages/users/user-detail/user-detail.module.ts index 40badf1b4a..822ace41e6 100644 --- a/console/src/app/pages/users/user-detail/user-detail.module.ts +++ b/console/src/app/pages/users/user-detail/user-detail.module.ts @@ -19,6 +19,7 @@ import { CardModule } from 'src/app/modules/card/card.module'; import { ChangesModule } from 'src/app/modules/changes/changes.module'; import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module'; import { InputModule } from 'src/app/modules/input/input.module'; +import { MachineKeysModule } from 'src/app/modules/machine-keys/machine-keys.module'; import { MetaLayoutModule } from 'src/app/modules/meta-layout/meta-layout.module'; import { PasswordComplexityViewModule } from 'src/app/modules/password-complexity-view/password-complexity-view.module'; import { RefreshTableModule } from 'src/app/modules/refresh-table/refresh-table.module'; @@ -29,11 +30,11 @@ import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.mod import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe/localized-date-pipe.module'; import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/timestamp-to-date-pipe.module'; +import { AuthFactorDialogComponent } from './auth-user-detail/auth-factor-dialog/auth-factor-dialog.component'; import { AuthPasswordlessComponent } from './auth-user-detail/auth-passwordless/auth-passwordless.component'; import { AuthUserDetailComponent } from './auth-user-detail/auth-user-detail.component'; import { AuthUserMfaComponent } from './auth-user-detail/auth-user-mfa/auth-user-mfa.component'; import { CodeDialogComponent } from './auth-user-detail/code-dialog/code-dialog.component'; -import { DialogOtpComponent } from './auth-user-detail/dialog-otp/dialog-otp.component'; import { DialogU2FComponent } from './auth-user-detail/dialog-u2f/dialog-u2f.component'; import { EditDialogComponent } from './auth-user-detail/edit-dialog/edit-dialog.component'; import { ResendEmailDialogComponent } from './auth-user-detail/resend-email-dialog/resend-email-dialog.component'; @@ -48,13 +49,11 @@ import { UserDetailRoutingModule } from './user-detail-routing.module'; import { PasswordlessComponent } from './user-detail/passwordless/passwordless.component'; import { UserDetailComponent } from './user-detail/user-detail.component'; import { UserMfaComponent } from './user-detail/user-mfa/user-mfa.component'; -import { MachineKeysModule } from 'src/app/modules/machine-keys/machine-keys.module'; @NgModule({ declarations: [ AuthUserDetailComponent, UserDetailComponent, - DialogOtpComponent, EditDialogComponent, AuthUserMfaComponent, AuthPasswordlessComponent, @@ -68,6 +67,7 @@ import { MachineKeysModule } from 'src/app/modules/machine-keys/machine-keys.mod ContactComponent, ResendEmailDialogComponent, DialogU2FComponent, + AuthFactorDialogComponent, ], imports: [ UserDetailRoutingModule, diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts index e4bc356962..596de57508 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts +++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts @@ -12,14 +12,9 @@ import { Email, Gender, Machine, Phone, Profile, User, UserState } from 'src/app import { ManagementService } from 'src/app/services/mgmt.service'; import { ToastService } from 'src/app/services/toast.service'; -import { EditDialogComponent } from '../auth-user-detail/edit-dialog/edit-dialog.component'; +import { EditDialogComponent, EditDialogType } from '../auth-user-detail/edit-dialog/edit-dialog.component'; import { ResendEmailDialogComponent } from '../auth-user-detail/resend-email-dialog/resend-email-dialog.component'; -export enum EditDialogType { - PHONE = 1, - EMAIL = 2, -} - @Component({ selector: 'app-user-detail', templateUrl: './user-detail.component.html', @@ -87,6 +82,7 @@ export class UserDetailComponent implements OnInit { } public saveProfile(profileData: Profile.AsObject): void { + console.log(profileData); if (this.user.human) { this.user.human.profile = profileData; this.mgmtUserService @@ -252,7 +248,8 @@ export class UserDetailComponent implements OnInit { labelKey: 'ACTIONS.NEWVALUE', titleKey: 'USER.LOGINMETHODS.PHONE.EDITTITLE', descriptionKey: 'USER.LOGINMETHODS.PHONE.EDITDESC', - value: this.user.human?.phone, + value: this.user.human?.phone?.phone, + type: EditDialogType.PHONE, }, width: '400px', }); @@ -271,7 +268,8 @@ export class UserDetailComponent implements OnInit { labelKey: 'ACTIONS.NEWVALUE', titleKey: 'USER.LOGINMETHODS.EMAIL.EDITTITLE', descriptionKey: 'USER.LOGINMETHODS.EMAIL.EDITDESC', - value: this.user.human?.email, + value: this.user.human?.email?.email, + type: EditDialogType.EMAIL, }, width: '400px', }); diff --git a/console/src/app/pages/users/user-list/user-table/user-table.component.html b/console/src/app/pages/users/user-list/user-table/user-table.component.html index 86444f83e7..49faf322c6 100644 --- a/console/src/app/pages/users/user-list/user-table/user-table.component.html +++ b/console/src/app/pages/users/user-list/user-table/user-table.component.html @@ -32,9 +32,10 @@ + + *ngIf="user.human && user.human.profile.displayName && user.human?.profile.firstName && user.human?.profile.lastName; else cog" + class="avatar" [name]="user.human.profile.displayName" [size]="32">
@@ -45,28 +46,6 @@ - - - {{ 'USER.PROFILE.FIRSTNAME' | translate }} - - - - {{user[type]?.firstName}} - - - - - {{ 'USER.PROFILE.LASTNAME' | translate }} - - - - {{user[type]?.lastName}} - - @@ -75,7 +54,8 @@ [ngTemplateOutletContext]="{key: UserListSearchKey.USERSEARCHKEY_DISPLAY_NAME}"> - {{user[type]?.displayName}} + {{user.human?.profile?.displayName}} + @@ -83,13 +63,17 @@ {{ 'USER.MACHINE.NAME' | translate }} - {{user[type]?.name}} + {{user.human?.name}} + {{user.machine?.name}} + {{ 'USER.MACHINE.DESCRIPTION' | translate }} - {{user[type]?.description}} + {{user.human?.description}} + {{user.machine?.description}} + @@ -111,15 +95,17 @@ [ngTemplateOutletContext]="{key: UserListSearchKey.EMAIL}"> - {{user[type]?.email}} + {{user.human?.email.email}} + {{ 'USER.DATA.STATE' | translate }} {{ - 'USER.DATA.STATE'+user.state | translate }} + [ngClass]="{'active': user.state === UserState.USER_STATE_ACTIVE, 'inactive': user.state === UserState.USER_STATE_INACTIVE}"> + {{ 'USER.DATA.STATE'+user.state | translate }} + diff --git a/console/src/app/pages/users/user-list/user-table/user-table.component.ts b/console/src/app/pages/users/user-list/user-table/user-table.component.ts index ba4b64f9d9..3822bdcae4 100644 --- a/console/src/app/pages/users/user-list/user-table/user-table.component.ts +++ b/console/src/app/pages/users/user-list/user-table/user-table.component.ts @@ -180,6 +180,8 @@ export class UserTableComponent implements OnInit { } this.userService.listUsers(limit, offset, [query]).then(resp => { + console.log(resp); + if (resp.details?.totalResult) { this.totalResult = resp.details?.totalResult; } diff --git a/console/src/app/pipes/timestamp-to-date-pipe/timestamp-to-date.pipe.ts b/console/src/app/pipes/timestamp-to-date-pipe/timestamp-to-date.pipe.ts index c9543739c8..1c12e01f95 100644 --- a/console/src/app/pipes/timestamp-to-date-pipe/timestamp-to-date.pipe.ts +++ b/console/src/app/pipes/timestamp-to-date-pipe/timestamp-to-date.pipe.ts @@ -11,8 +11,10 @@ export class TimestampToDatePipe implements PipeTransform { } private dateFromTimestamp(date: Timestamp.AsObject): any { - const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000 / 1000); - return ts; + if (date?.seconds !== undefined && date?.nanos !== undefined) { + const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000 / 1000); + return ts; + } } } diff --git a/console/src/app/services/mgmt.service.ts b/console/src/app/services/mgmt.service.ts index e0eb16705a..b8700aa250 100644 --- a/console/src/app/services/mgmt.service.ts +++ b/console/src/app/services/mgmt.service.ts @@ -1556,7 +1556,6 @@ export class ManagementService { if (offset) { query.setOffset(offset); } - req.setQuery(query); if (queryList) { req.setQueriesList(queryList); diff --git a/console/src/assets/environment.json b/console/src/assets/environment.json index ac321e9859..115ba9f155 100644 --- a/console/src/assets/environment.json +++ b/console/src/assets/environment.json @@ -1,7 +1,7 @@ { - "authServiceUrl": "https://api.zitadel.dev", - "mgmtServiceUrl": "https://api.zitadel.dev", - "adminServiceUrl":"https://api.zitadel.dev", - "issuer": "https://issuer.zitadel.dev", - "clientid": "70669160379706195@zitadel" + "authServiceUrl": "https://api.zitadel.io", + "mgmtServiceUrl": "https://api.zitadel.io", + "adminServiceUrl":"https://api.zitadel.io", + "issuer": "https://issuer.zitadel.io", + "clientid": "98804911164221523@zitadel" }