diff --git a/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.html b/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.html index beb03f476d..bddb573c0a 100644 --- a/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.html +++ b/console/src/app/pages/orgs/org-detail/domain-verification/domain-verification.component.html @@ -1,47 +1,54 @@ -{{domain.domain}} {{'ORG.PAGES.ORGDOMAIN_TITLE' | translate}} +{{'ORG.PAGES.ORGDOMAIN.TITLE' | translate}} {{domain.domain}}
-

{{ 'ORG.PAGES.ORGDOMAIN_VERIFICATION' | translate }}

+

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

-

{{ 'ORG.PAGES.ORGDOMAIN_VERIFICATION_VALIDATION_DESC' | translate }}

+

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

- {{'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.TYPES.'+ domain.validationType | translate}}

+ +
-

{{ 'ORG.PAGES.ORGDOMAIN_VERIFICATION_NEWTOKEN_TITLE' | translate }}

-

{{ 'ORG.PAGES.ORGDOMAIN_VERIFICATION_NEWTOKEN_DESC' | translate }}

+ +

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

+

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

-
- - -
-
-

HTTP TOKEN

-

{{http?.url}}.txt

- -
- +
+ +
-
+
+

HTTP TOKEN

+

{{http?.url}}.txt

-
-

DNS TOKEN

-
-

{{dns?.token}}

- +
+ +
-

{{dns?.url}}

-
+ +
+

DNS TOKEN

+
+

{{dns?.token}}

+ +
+

{{dns?.url}}

+
+
-

{{'ORG.PAGES.ORGDOMAIN_VERIFICATION' | translate}}

+

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

diff --git a/console/src/app/pages/projects/owned-projects/owned-projects.component.ts b/console/src/app/pages/projects/owned-projects/owned-projects.component.ts index e17472f071..acf63d2350 100644 --- a/console/src/app/pages/projects/owned-projects/owned-projects.component.ts +++ b/console/src/app/pages/projects/owned-projects/owned-projects.component.ts @@ -5,6 +5,4 @@ import { Component } from '@angular/core'; templateUrl: './owned-projects.component.html', styleUrls: ['./owned-projects.component.scss'], }) -export class OwnedProjectsComponent { - constructor() { } -} +export class OwnedProjectsComponent { } diff --git a/console/src/app/services/interceptors/org.interceptor.ts b/console/src/app/services/interceptors/org.interceptor.ts index bcd8522c52..f488132b3e 100644 --- a/console/src/app/services/interceptors/org.interceptor.ts +++ b/console/src/app/services/interceptors/org.interceptor.ts @@ -5,7 +5,8 @@ import { Org } from 'src/app/proto/generated/auth_pb'; import { StorageService } from '../storage.service'; -const orgKey = 'x-zitadel-orgid'; +const ORG_HEADER_KEY = 'x-zitadel-orgid'; +const ORG_STORAGE_KEY = 'organization'; @Injectable({ providedIn: 'root' }) export class OrgInterceptor implements UnaryInterceptor { constructor(private readonly storageService: StorageService) { } @@ -13,14 +14,19 @@ export class OrgInterceptor implements UnaryInt public intercept(request: Request, invoker: any): Promise> { const metadata = request.getMetadata(); - const org: Org.AsObject | null = (this.storageService.getItem('organization')); + const org: Org.AsObject | null = (this.storageService.getItem(ORG_STORAGE_KEY)); if (org) { - metadata[orgKey] = `${org.id}`; + metadata[ORG_HEADER_KEY] = `${org.id}`; } return invoker(request).then((response: any) => { return response; + }).catch((error: any) => { + if (error.code === 7 && error.message.startsWith('Organisation doesn\'t exist')) { + this.storageService.removeItem(ORG_STORAGE_KEY); + } + return Promise.reject(error); }); } } diff --git a/console/src/app/services/storage.service.ts b/console/src/app/services/storage.service.ts index af207f76e0..25d60901d7 100644 --- a/console/src/app/services/storage.service.ts +++ b/console/src/app/services/storage.service.ts @@ -1,11 +1,11 @@ import { Injectable } from '@angular/core'; import { OAuthStorage } from 'angular-oauth2-oidc'; +const STORAGE_PREFIX = 'zitadel'; @Injectable({ providedIn: 'root', }) - export class StorageService implements OAuthStorage { private storage: Storage = window.sessionStorage; @@ -28,7 +28,7 @@ export class StorageService implements OAuthStorage { } public getPrefixedKey(key: string): string { - return `caos:${key}`; + return `${STORAGE_PREFIX}:${key}`; } } diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index 75fa5fd8d5..5c6034f0ae 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -376,14 +376,22 @@ "ACTIVE":"Aktiv", "CREATE":"Organisation erstellen", "ORGDETAIL_TITLE":"Gebe den Namen und die Domain für die neue Organisation ein.", - "ORGDOMAIN_TITLE":"Verifikation der Domain der Organisation", - "ORGDOMAIN_VERIFICATION":"Überprüfe den Besitz Deiner Domain, indem Du eine Bestätigungsdatei herunterlädst und unter der angegebenen URL speicherst, oder indem Du sie mit einem DNS-Eintrag verifizierst.", - "ORGDOMAIN_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.", "ORGDETAILUSER_TITLE":"Organisationsbesitzer hinzufügen", - "ORGDOMAIN_VERIFICATION_VALIDATION_DESC":"Die Tokens werden regelmässig überprüft, um sicherzustellen, dass Du weiterhin im Besitz der Domain bist.", - "ORGDOMAIN_VERIFICATION_NEWTOKEN_TITLE":"Neues Token anfordern", - "ORGDOMAIN_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\".", - "ORGDOMAIN_VERIFICATION_VALIDATION_ONGOING":"Ein Token zur Validierung wurde bereits angefragt. Klicke auf \"Validieren\", um dieses Token zu validieren.", + "ORGDOMAIN": { + "TITLE":"Verifikation der Domain der Organisation", + "VERIFICATION":"Überprüfe den Besitz Deiner Domain, indem Du eine Bestätigungsdatei herunterlädst und unter der angegebenen URL speicherst, oder indem Du sie mit einem DNS-Eintrag verifizierst.", + "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_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_VALIDATION_ONGOING":"Ein Token zur Validierung wurde bereits angefragt. Klicke auf \"Validieren\", um dieses Token zu validieren.", + "VERIFICATION_VALIDATION_ONGOING_TYPE":"Typ des Tokens:", + "REQUESTNEWTOKEN":"Neues Token anfordern", + "TYPES": { + "1":"HTTP", + "2":"DNS" + } + }, "DOWNLOAD_FILE":"Datei herunterladen", "SELECTORGTOOLTIP":"Diese Organisation auswählen", "PRIMARYDOMAIN":"Primäre Domain", diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index 1899c2e163..eceaafb662 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -376,14 +376,22 @@ "ACTIVE":"Active", "CREATE":"Create Organisation", "ORGDETAIL_TITLE":"Enter the name and domain of your new organisation.", - "ORGDOMAIN_TITLE":"Organisation Domain Ownership Verification", - "ORGDOMAIN_VERIFICATION":"Verify the ownership of your domain. You need to download a verification file and upload it at the provided URL listed below, or place a TXT Record DNS entry for the provided URL. To complete, click the button to verify.", - "ORGDOMAIN_VERIFICATION_SKIP":"You can skip verification for now and continue to create your organisation, but in order to use your organisation this step has to be completed!", "ORGDETAILUSER_TITLE":"Configure Organisation Owner", - "ORGDOMAIN_VERIFICATION_VALIDATION_DESC":"The tokens are checked regularly to ensure you are still owner of the domain.", - "ORGDOMAIN_VERIFICATION_NEWTOKEN_TITLE":"Request New Token", - "ORGDOMAIN_VERIFICATION_NEWTOKEN_DESC":"If you want to request a new token, select you preferred method. If you want to validate a persisting token, click the button above.", - "ORGDOMAIN_VERIFICATION_VALIDATION_ONGOING":"A verification token has already been requested. Click on the button to trigger a verification check.", + "ORGDOMAIN": { + "TITLE":"Organisation Domain Ownership Verification", + "VERIFICATION":"Verify the ownership of your domain. You need to download a verification file and upload it at the provided URL listed below, or place a TXT Record DNS entry for the provided URL. To complete, click the button to verify.", + "VERIFICATION_SKIP":"You can skip verification for now and continue to create your organisation, but in order to use your organisation this step has to be completed!", + "VERIFICATION_VALIDATION_DESC":"The tokens are checked regularly to ensure you are still owner of the domain.", + "VERIFICATION_NEWTOKEN_TITLE":"Request New Token", + "VERIFICATION_NEWTOKEN_DESC":"If you want to request a new token, select you preferred method. If you want to validate a persisting token, click the button above.", + "VERIFICATION_VALIDATION_ONGOING":"A verification token has already been requested. Click on the button to trigger a verification check.", + "VERIFICATION_VALIDATION_ONGOING_TYPE":"Type of the token:", + "REQUESTNEWTOKEN":"Request new Token", + "TYPES": { + "1":"HTTP", + "2":"DNS" + } + }, "DOWNLOAD_FILE":"Download File", "SELECTORGTOOLTIP":"Select this organisation.", "PRIMARYDOMAIN":"Primary Domain", diff --git a/console/src/assets/images/zitadel-social-preview25.png b/console/src/assets/images/zitadel-social-preview25.png new file mode 100644 index 0000000000..89b47ae455 Binary files /dev/null and b/console/src/assets/images/zitadel-social-preview25.png differ diff --git a/console/src/index.html b/console/src/index.html index 9d2fd78448..b63d62074b 100644 --- a/console/src/index.html +++ b/console/src/index.html @@ -23,7 +23,6 @@ -