mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-11 00:25:12 +00:00
feat(console): replace wget with curl, user login prompt, warn dialog (#387)
* remove evil wget, add warn-dialog, login hint * i18n * reference ngsw.js * update clientid * fix warn dialog * lint * Update console/src/assets/i18n/de.json Co-authored-by: Florian Forster <[email protected]> * Update console/src/assets/i18n/en.json Co-authored-by: Florian Forster <[email protected]> Co-authored-by: Florian Forster <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
parent
a5bfd085a1
commit
c621fdee41
@@ -10,7 +10,7 @@
|
||||
<button (click)="editUserProfile()" mat-stroked-button>{{'USER.EDITACCOUNT' | translate}}</button>
|
||||
<div class="l-accounts">
|
||||
<mat-progress-bar *ngIf="loadingUsers" color="primary" mode="indeterminate"></mat-progress-bar>
|
||||
<a class="row" *ngFor="let user of users" (click)="selectAccount(user.userName)">
|
||||
<a class="row" *ngFor="let user of users" (click)="selectAccount(user.loginName)">
|
||||
<app-avatar *ngIf="user && user.displayName" class="small-avatar"
|
||||
[name]="user.displayName ? user.displayName : ''" [size]="32">
|
||||
</app-avatar>
|
||||
@@ -22,7 +22,7 @@
|
||||
<span class="fill-space"></span>
|
||||
<mat-icon>keyboard_arrow_right</mat-icon>
|
||||
</a>
|
||||
<a class="row" (click)="selectAccount()">
|
||||
<a class="row" (click)="selectNewAccount()">
|
||||
<div class="icon-wrapper">
|
||||
<i class="las la-user-plus"></i>
|
||||
</div>
|
||||
|
||||
@@ -45,21 +45,27 @@ export class AccountsCardComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
public selectAccount(loginHint?: string, idToken?: string): void {
|
||||
public selectAccount(loginName?: string): void {
|
||||
const configWithPrompt: Partial<AuthConfig> = {
|
||||
customQueryParams: {
|
||||
prompt: 'select_account',
|
||||
// prompt: 'select_account',
|
||||
} as any,
|
||||
};
|
||||
if (loginHint) {
|
||||
(configWithPrompt as any).customQueryParams['login_hint'] = loginHint;
|
||||
}
|
||||
if (idToken) {
|
||||
(configWithPrompt as any).customQueryParams['id_token_hint'] = idToken;
|
||||
if (loginName) {
|
||||
(configWithPrompt as any).customQueryParams['login_hint'] = loginName;
|
||||
}
|
||||
this.authService.authenticate(configWithPrompt);
|
||||
}
|
||||
|
||||
public selectNewAccount(): void {
|
||||
const configWithPrompt: Partial<AuthConfig> = {
|
||||
customQueryParams: {
|
||||
prompt: 'login',
|
||||
} as any,
|
||||
};
|
||||
this.authService.authenticate(configWithPrompt);
|
||||
}
|
||||
|
||||
public logout(): void {
|
||||
this.authService.signout();
|
||||
this.close.emit();
|
||||
|
||||
Reference in New Issue
Block a user