mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
feat: allow skip of success page for native apps (#5627)
add possibility to return to callback directly after login without rendering the successful login page
This commit is contained in:
@@ -306,7 +306,7 @@
|
||||
</span>
|
||||
<span class="right">
|
||||
<span>
|
||||
{{ 'APP.API.AUTHMETHOD.' + authMethodType?.value | translate }}
|
||||
{{ 'APP.API.AUTHMETHOD.' + apiAppRequest.toObject().authMethodType | translate }}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
@@ -331,11 +331,24 @@
|
||||
</div>
|
||||
</cnsl-info-section>
|
||||
|
||||
<mat-checkbox
|
||||
*ngIf="skipNativeAppSuccessPage && appType?.value === OIDCAppType.OIDC_APP_TYPE_NATIVE"
|
||||
class="full-width"
|
||||
style="margin-top: 1.5rem"
|
||||
[formControl]="skipNativeAppSuccessPage"
|
||||
color="primary"
|
||||
>
|
||||
{{ 'APP.OIDC.SKIPNATIVEAPPSUCCESSPAGE' | translate }}</mat-checkbox
|
||||
>
|
||||
<cnsl-info-section *ngIf="appType?.value === OIDCAppType.OIDC_APP_TYPE_NATIVE" class="full-width app-desc">
|
||||
<span>{{ 'APP.OIDC.SKIPNATIVEAPPSUCCESSPAGE_DESCRIPTION' | translate }}</span>
|
||||
</cnsl-info-section>
|
||||
|
||||
<cnsl-redirect-uris
|
||||
*ngIf="appType?.value !== undefined"
|
||||
class="redirect-section"
|
||||
[disabled]="!canWrite"
|
||||
[devMode]="devMode?.value"
|
||||
[devMode]="!!devMode?.value"
|
||||
[(ngModel)]="redirectUrisList"
|
||||
title="{{ 'APP.OIDC.REDIRECT' | translate }}"
|
||||
[isNative]="appType?.value === OIDCAppType.OIDC_APP_TYPE_NATIVE"
|
||||
@@ -346,7 +359,7 @@
|
||||
*ngIf="appType?.value !== undefined"
|
||||
class="redirect-section"
|
||||
[disabled]="!canWrite"
|
||||
[devMode]="devMode?.value"
|
||||
[devMode]="!!devMode?.value"
|
||||
[(ngModel)]="postLogoutRedirectUrisList"
|
||||
title="{{ 'APP.OIDC.POSTLOGOUTREDIRECT' | translate }}"
|
||||
[isNative]="appType?.value === OIDCAppType.OIDC_APP_TYPE_NATIVE"
|
||||
|
@@ -2,7 +2,7 @@ import { COMMA, ENTER, SPACE } from '@angular/cdk/keycodes';
|
||||
import { Location } from '@angular/common';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { AbstractControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import { AbstractControl, FormControl, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
import { MatLegacyCheckboxChange as MatCheckboxChange } from '@angular/material/legacy-checkbox';
|
||||
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@@ -149,7 +149,8 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
private http: HttpClient,
|
||||
) {
|
||||
this.oidcForm = this.fb.group({
|
||||
devMode: [{ value: false, disabled: true }, []],
|
||||
devMode: [{ value: false, disabled: true }],
|
||||
skipNativeAppSuccessPage: [{ value: false, disabled: true }],
|
||||
clientId: [{ value: '', disabled: true }],
|
||||
responseTypesList: [{ value: [], disabled: true }],
|
||||
grantTypesList: [{ value: [], disabled: true }],
|
||||
@@ -548,7 +549,8 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
this.app.oidcConfig.redirectUrisList = this.redirectUrisList;
|
||||
this.app.oidcConfig.postLogoutRedirectUrisList = this.postLogoutRedirectUrisList;
|
||||
this.app.oidcConfig.additionalOriginsList = this.additionalOriginsList;
|
||||
this.app.oidcConfig.devMode = this.devMode?.value;
|
||||
this.app.oidcConfig.devMode = !!this.devMode?.value;
|
||||
this.app.oidcConfig.skipNativeAppSuccessPage = !!this.skipNativeAppSuccessPage?.value;
|
||||
|
||||
const req = new UpdateOIDCAppConfigRequest();
|
||||
req.setProjectId(this.projectId);
|
||||
@@ -571,6 +573,7 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
req.setAdditionalOriginsList(this.app.oidcConfig.additionalOriginsList);
|
||||
req.setPostLogoutRedirectUrisList(this.app.oidcConfig.postLogoutRedirectUrisList);
|
||||
req.setDevMode(this.app.oidcConfig.devMode);
|
||||
req.setSkipNativeAppSuccessPage(this.app.oidcConfig.skipNativeAppSuccessPage);
|
||||
|
||||
if (this.clockSkewSeconds?.value) {
|
||||
const dur = new Duration();
|
||||
@@ -738,11 +741,15 @@ export class AppDetailComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
public get apiAuthMethodType(): AbstractControl | null {
|
||||
return this.apiForm.get('authMethodType');
|
||||
return this.apiForm.get('authMethodType') as UntypedFormControl;
|
||||
}
|
||||
|
||||
public get devMode(): UntypedFormControl | null {
|
||||
return this.oidcForm.get('devMode') as UntypedFormControl;
|
||||
public get devMode(): FormControl<boolean> | null {
|
||||
return this.oidcForm.get('devMode') as FormControl<boolean>;
|
||||
}
|
||||
|
||||
public get skipNativeAppSuccessPage(): FormControl<boolean> | null {
|
||||
return this.oidcForm.get('skipNativeAppSuccessPage') as FormControl<boolean>;
|
||||
}
|
||||
|
||||
public get accessTokenType(): AbstractControl | null {
|
||||
|
@@ -1937,6 +1937,8 @@
|
||||
"REGENERATESECRET": "Client Secret neu generieren",
|
||||
"DEVMODE": "Entwicklermodus",
|
||||
"DEVMODEDESC": "Bei eingeschaltetem Entwicklermodus werden die Weiterleitungs-URIs im OIDC-Flow nicht validiert.",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE": "Login Erfolgseite überspringen",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE_DESCRIPTION": "Erfolgseite nach dem Login für diese Native Applikation überspringen.",
|
||||
"REDIRECT": "Weiterleitungs-URIs",
|
||||
"REDIRECTSECTION": "Weiterleitungs-URIs",
|
||||
"POSTLOGOUTREDIRECT": "URIs für Post-Log-out",
|
||||
|
@@ -1930,6 +1930,8 @@
|
||||
"REGENERATESECRET": "Regenerate Client Secret",
|
||||
"DEVMODE": "Development Mode",
|
||||
"DEVMODEDESC": "Beware: With development mode enabled redirect URIs will not be validated.",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE": "Skip Login Success Page",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE_DESCRIPTION": "Skip the success page after a login for this native app.",
|
||||
"REDIRECT": "Redirect URIs",
|
||||
"REDIRECTSECTION": "Redirect URIs",
|
||||
"POSTLOGOUTREDIRECT": "Post Logout URIs",
|
||||
|
@@ -1938,6 +1938,8 @@
|
||||
"REGENERATESECRET": "Régénérer le secret du client",
|
||||
"DEVMODE": "Mode développement",
|
||||
"DEVMODEDESC": "Attention",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE": "Sauter la page de succès de connexion",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE_DESCRIPTION": "Sauter la page de succès après la connexion pour cette application native",
|
||||
"REDIRECT": "Rediriger les URI",
|
||||
"REDIRECTSECTION": "URI de redirection",
|
||||
"POSTLOGOUTREDIRECT": "URIs de post-déconnexion",
|
||||
|
@@ -1939,6 +1939,8 @@
|
||||
"REGENERATESECRET": "Rigenera il Client Secret",
|
||||
"DEVMODE": "Modalit\u00e0 di sviluppo (DEV Mode)",
|
||||
"DEVMODEDESC": "Attenzione: Con la modalit\u00e0 di sviluppo abilitata, gli URI di reindirizzamento non saranno convalidati.",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE": "Salta la pagina di successo dopo il login",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE_DESCRIPTION": "Salta la pagina di successo dopo il login per questa applicazione nativa",
|
||||
"REDIRECT": "URI per il reindrizzamento",
|
||||
"REDIRECTSECTION": "Reindirizzamento",
|
||||
"POSTLOGOUTREDIRECT": "URI post logout",
|
||||
|
@@ -1929,6 +1929,8 @@
|
||||
"REGENERATESECRET": "クライアントシークレットを再生成する",
|
||||
"DEVMODE": "開発モード",
|
||||
"DEVMODEDESC": "注意:開発モードを有効にすると、URIが認証されません。",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE": "ログイン後に成功ページをスキップする",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE_DESCRIPTION": "このネイティブアプリのログイン後に成功ページをスキップする",
|
||||
"REDIRECT": "リダイレクトURI",
|
||||
"REDIRECTSECTION": "リダイレクトURI",
|
||||
"POSTLOGOUTREDIRECT": "ログアウトURI",
|
||||
|
@@ -1938,6 +1938,8 @@
|
||||
"REGENERATESECRET": "Odtwórz sekret klienta",
|
||||
"DEVMODE": "Tryb rozwoju",
|
||||
"DEVMODEDESC": "Uwaga: przy włączonym trybie rozwoju adresy URI przekierowania nie będą sprawdzane.",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE": "Pomiń stronę sukcesu po zalogowaniu",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE_DESCRIPTION": "Pomiń stronę sukcesu po zalogowaniu dla tej Natywny aplikację",
|
||||
"REDIRECT": "Adresy URI przekierowania",
|
||||
"REDIRECTSECTION": "Adresy URI przekierowania",
|
||||
"POSTLOGOUTREDIRECT": "Adresy URI po wylogowaniu",
|
||||
|
@@ -1937,6 +1937,8 @@
|
||||
"REGENERATESECRET": "重新生成客户端密钥",
|
||||
"DEVMODE": "开发模式",
|
||||
"DEVMODEDESC": "注意:启用开发模式的重定向 URI 将不会被验证。",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE": "登录后跳过成功页面",
|
||||
"SKIPNATIVEAPPSUCCESSPAGE_DESCRIPTION": "登录后跳过本机应用的成功页面",
|
||||
"REDIRECT": "重定向 URLs",
|
||||
"REDIRECTSECTION": "重定向 URLs",
|
||||
"POSTLOGOUTREDIRECT": "退出登录重定向 URLs",
|
||||
|
Reference in New Issue
Block a user