mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 21:37:24 +00:00
fix(console): configWithPrompt cleanup (#3796)
* fix: configWithPrompt cleanup * code dialog text Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
parent
11d24f6d8a
commit
b1da8975f5
@ -21,11 +21,10 @@ export class AuthGuard implements CanActivate {
|
|||||||
const hint = route.queryParams['login_hint'];
|
const hint = route.queryParams['login_hint'];
|
||||||
const configWithPrompt: Partial<AuthConfig> = {
|
const configWithPrompt: Partial<AuthConfig> = {
|
||||||
customQueryParams: {
|
customQueryParams: {
|
||||||
// prompt: 'select_account',
|
login_hint: hint,
|
||||||
} as any,
|
},
|
||||||
};
|
};
|
||||||
(configWithPrompt as any).customQueryParams['login_hint'] = hint;
|
console.log(`authenticate with login_hint: ${hint}`);
|
||||||
console.log('auth', hint);
|
|
||||||
this.auth.authenticate(configWithPrompt);
|
this.auth.authenticate(configWithPrompt);
|
||||||
} else {
|
} else {
|
||||||
return this.auth.authenticate();
|
return this.auth.authenticate();
|
||||||
|
@ -50,15 +50,13 @@ export class AccountsCardComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public selectAccount(loginHint?: string): void {
|
public selectAccount(loginHint: string): void {
|
||||||
const configWithPrompt: Partial<AuthConfig> = {
|
const configWithPrompt: Partial<AuthConfig> = {
|
||||||
customQueryParams: {
|
customQueryParams: {
|
||||||
// prompt: 'select_account',
|
login_hint: loginHint,
|
||||||
} as any,
|
},
|
||||||
};
|
};
|
||||||
if (loginHint) {
|
(configWithPrompt as any).customQueryParams['login_hint'] = loginHint;
|
||||||
(configWithPrompt as any).customQueryParams['login_hint'] = loginHint;
|
|
||||||
}
|
|
||||||
this.authService.authenticate(configWithPrompt);
|
this.authService.authenticate(configWithPrompt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<h1 mat-dialog-title>
|
<h1 mat-dialog-title>
|
||||||
<span>{{'USER.CODEDIALOG.TITLE' | translate}} {{data?.number}}</span>
|
<span
|
||||||
|
>{{ 'USER.CODEDIALOG.TITLE' | translate }} <span *ngIf="data?.number.phone">{{ data.number.phone }}</span></span
|
||||||
|
>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="desc cnsl-secondary-text">{{'USER.CODEDIALOG.DESCRIPTION' | translate}}</p>
|
<p class="desc cnsl-secondary-text">{{ 'USER.CODEDIALOG.DESCRIPTION' | translate }}</p>
|
||||||
<div mat-dialog-content>
|
<div mat-dialog-content>
|
||||||
<cnsl-form-field class="formfield">
|
<cnsl-form-field class="formfield">
|
||||||
<cnsl-label>{{ 'USER.CODEDIALOG.CODE' | translate }}</cnsl-label>
|
<cnsl-label>{{ 'USER.CODEDIALOG.CODE' | translate }}</cnsl-label>
|
||||||
@ -10,11 +12,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div mat-dialog-actions class="action">
|
<div mat-dialog-actions class="action">
|
||||||
<button color="primary" mat-stroked-button class="ok-button" (click)="closeDialog()">
|
<button color="primary" mat-stroked-button class="ok-button" (click)="closeDialog()">
|
||||||
{{'ACTIONS.CLOSE' | translate}}
|
{{ 'ACTIONS.CLOSE' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button [disabled]="!code" cdkFocusInitial color="primary" mat-raised-button class="ok-button"
|
<button [disabled]="!code" cdkFocusInitial color="primary" mat-raised-button class="ok-button" (click)="closeDialog(code)">
|
||||||
(click)="closeDialog(code)">
|
{{ 'ACTIONS.OK' | translate }}
|
||||||
{{'ACTIONS.OK' | translate}}
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user