mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
fix(console): start verification flow on domain create, show verification if token is requested (#907)
* start verification flow on add, show v if token req * fix: sem
This commit is contained in:
parent
78e5c26015
commit
9d009beb36
@ -5,13 +5,14 @@
|
|||||||
<p class="desc warn">{{ 'ORG.PAGES.ORGDOMAIN.VERIFICATION_VALIDATION_DESC' | translate }}</p>
|
<p class="desc warn">{{ 'ORG.PAGES.ORGDOMAIN.VERIFICATION_VALIDATION_DESC' | translate }}</p>
|
||||||
|
|
||||||
|
|
||||||
<p *ngIf="domain.validationType !== OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_UNSPECIFIED" class="desc">
|
<p *ngIf="domain.validationType !== OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_UNSPECIFIED && !(dns || http)"
|
||||||
|
class="desc">
|
||||||
{{'ORG.PAGES.ORGDOMAIN.VERIFICATION_VALIDATION_ONGOING' | translate: domain }}
|
{{'ORG.PAGES.ORGDOMAIN.VERIFICATION_VALIDATION_ONGOING' | translate: domain }}
|
||||||
{{'ORG.PAGES.ORGDOMAIN.VERIFICATION_VALIDATION_ONGOING_TYPE' | translate}}
|
{{'ORG.PAGES.ORGDOMAIN.VERIFICATION_VALIDATION_ONGOING_TYPE' | translate}}
|
||||||
{{'ORG.PAGES.ORGDOMAIN.TYPES.'+ domain.validationType | translate}}</p>
|
{{'ORG.PAGES.ORGDOMAIN.TYPES.'+ domain.validationType | translate}}</p>
|
||||||
<div *ngIf="domain.validationType !== OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_UNSPECIFIED"
|
<div *ngIf="domain.validationType !== OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_UNSPECIFIED"
|
||||||
class="btn-container">
|
class="btn-container">
|
||||||
<button color="primary" type="submit" mat-raised-button
|
<button color="primary" type="submit" mat-raised-button *ngIf="!(dns || http)"
|
||||||
(click)="validate()">{{ 'ACTIONS.VERIFY' | translate }}</button>
|
(click)="validate()">{{ 'ACTIONS.VERIFY' | translate }}</button>
|
||||||
|
|
||||||
<button *ngIf="!showNew" mat-stroked-button color="primary"
|
<button *ngIf="!showNew" mat-stroked-button color="primary"
|
||||||
@ -33,6 +34,8 @@
|
|||||||
<div class="btn-container">
|
<div class="btn-container">
|
||||||
<button mat-stroked-button (click)="saveFile()"
|
<button mat-stroked-button (click)="saveFile()"
|
||||||
color="primary">{{ 'ORG.PAGES.DOWNLOAD_FILE' | translate }}</button>
|
color="primary">{{ 'ORG.PAGES.DOWNLOAD_FILE' | translate }}</button>
|
||||||
|
<button color="primary" type="submit" mat-raised-button
|
||||||
|
(click)="validate()">{{ 'ACTIONS.VERIFY' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -45,6 +48,8 @@
|
|||||||
<i *ngIf="copied != dns.token" class="las la-clipboard"></i>
|
<i *ngIf="copied != dns.token" class="las la-clipboard"></i>
|
||||||
<i *ngIf="copied == dns.token" class="las la-clipboard-check"></i>
|
<i *ngIf="copied == dns.token" class="las la-clipboard-check"></i>
|
||||||
</button>
|
</button>
|
||||||
|
<button color="primary" type="submit" mat-raised-button
|
||||||
|
(click)="validate()">{{ 'ACTIONS.VERIFY' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="entry">{{dns?.url}}</p>
|
<p class="entry">{{dns?.url}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
font-size: .9rem;
|
font-size: .9rem;
|
||||||
|
|
||||||
&.warn {
|
&.warn {
|
||||||
color: rgb(201, 51, 71);
|
color: rgb(201, 51, 72);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,22 +28,25 @@ export class DomainVerificationComponent {
|
|||||||
private mgmtService: ManagementService,
|
private mgmtService: ManagementService,
|
||||||
) {
|
) {
|
||||||
this.domain = data.domain;
|
this.domain = data.domain;
|
||||||
console.log(data);
|
|
||||||
if (this.domain.validationType === OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_UNSPECIFIED) {
|
if (this.domain.validationType === OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_UNSPECIFIED) {
|
||||||
this.showNew = true;
|
this.showNew = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadHttpToken(): Promise<void> {
|
async loadHttpToken(): Promise<void> {
|
||||||
this.http = (await this.mgmtService.GenerateMyOrgDomainValidation(
|
this.mgmtService.GenerateMyOrgDomainValidation(
|
||||||
this.domain.domain,
|
this.domain.domain,
|
||||||
OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_HTTP)).toObject();
|
OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_HTTP).then((http) => {
|
||||||
|
this.http = http.toObject();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadDnsToken(): Promise<void> {
|
async loadDnsToken(): Promise<void> {
|
||||||
this.dns = (await this.mgmtService.GenerateMyOrgDomainValidation(
|
this.mgmtService.GenerateMyOrgDomainValidation(
|
||||||
this.domain.domain,
|
this.domain.domain,
|
||||||
OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_DNS)).toObject();
|
OrgDomainValidationType.ORGDOMAINVALIDATIONTYPE_DNS).then((dns) => {
|
||||||
|
this.dns = dns.toObject();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public closeDialog(): void {
|
public closeDialog(): void {
|
||||||
|
@ -134,6 +134,8 @@ export class OrgDetailComponent implements OnInit, OnDestroy {
|
|||||||
newDomainView.setVerified(newDomain.getVerified());
|
newDomainView.setVerified(newDomain.getVerified());
|
||||||
|
|
||||||
this.domains.push(newDomainView.toObject());
|
this.domains.push(newDomainView.toObject());
|
||||||
|
|
||||||
|
this.verifyDomain(newDomainView.toObject());
|
||||||
this.toast.showInfo('ORG.TOAST.DOMAINADDED', true);
|
this.toast.showInfo('ORG.TOAST.DOMAINADDED', true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -204,6 +206,7 @@ export class OrgDetailComponent implements OnInit, OnDestroy {
|
|||||||
data: {
|
data: {
|
||||||
domain: domain,
|
domain: domain,
|
||||||
},
|
},
|
||||||
|
width: '500px',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,8 +381,8 @@
|
|||||||
"VERIFICATION_SKIP":"Du kannst die Überprüfung vorerst überspringen und Deine Organisation erstellen. Um Deine Organisation jedoch verwenden zu können, muss dieser Schritt abgeschlossen sein.",
|
"VERIFICATION_SKIP":"Du kannst die Überprüfung vorerst überspringen und Deine Organisation erstellen. Um Deine Organisation jedoch verwenden zu können, muss dieser Schritt abgeschlossen sein.",
|
||||||
"VERIFICATION_VALIDATION_DESC":"Die Tokens werden regelmässig überprüft, um sicherzustellen, dass Du weiterhin im Besitz der Domain bist.",
|
"VERIFICATION_VALIDATION_DESC":"Die Tokens werden regelmässig überprüft, um sicherzustellen, dass Du weiterhin im Besitz der Domain bist.",
|
||||||
"VERIFICATION_NEWTOKEN_TITLE":"Neues Token anfordern",
|
"VERIFICATION_NEWTOKEN_TITLE":"Neues Token anfordern",
|
||||||
"VERIFICATION_NEWTOKEN_DESC":"Wenn Du ein neues Token anfordern willst, klicke auf die gewünschte Methode. Wenn Du ein vorhandenes Token validieren möchtest, klicke auf \"Validieren\".",
|
"VERIFICATION_NEWTOKEN_DESC":"Wenn Du ein neues Token anfordern willst, klicke auf die gewünschte Methode. Wenn Du ein vorhandenes Token validieren möchtest, klicke auf \"Verifizieren\".",
|
||||||
"VERIFICATION_VALIDATION_ONGOING":"Ein Token zur Validierung wurde bereits angefragt. Klicke auf \"Validieren\", um dieses Token zu validieren.",
|
"VERIFICATION_VALIDATION_ONGOING":"Ein Token zur Validierung wurde bereits angefragt. Klicke auf \"Verifizieren\", um dieses Token zu validieren.",
|
||||||
"VERIFICATION_VALIDATION_ONGOING_TYPE":"Typ des Tokens:",
|
"VERIFICATION_VALIDATION_ONGOING_TYPE":"Typ des Tokens:",
|
||||||
"REQUESTNEWTOKEN":"Neues Token anfordern",
|
"REQUESTNEWTOKEN":"Neues Token anfordern",
|
||||||
"TYPES": {
|
"TYPES": {
|
||||||
|
Loading…
Reference in New Issue
Block a user