WEB-233: Improve the OIDC integration with 2FA (#2616)

This commit is contained in:
AllsVeam
2025-09-01 13:55:35 -06:00
committed by GitHub
parent 801dd3fdfe
commit 6ee9f4d4d2
66 changed files with 4425 additions and 135 deletions
@@ -15,6 +15,10 @@ import { MatProgressBar } from '@angular/material/progress-bar';
import { MatProgressSpinner } from '@angular/material/progress-spinner';
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
/** Custom Service Zitadel */
import { AuthService } from '../../zitadel/auth.service';
import { environment } from '../../../environments/environment';
/**
* Login form component.
*/
@@ -39,6 +43,7 @@ export class LoginFormComponent implements OnInit {
passwordInputType: string = 'password';
/** True if loading. */
loading = false;
oidcServerEnabled = environment.OIDC.oidcServerEnabled;
/**
* @param {FormBuilder} formBuilder Form Builder.
@@ -46,7 +51,8 @@ export class LoginFormComponent implements OnInit {
*/
constructor(
private formBuilder: FormBuilder,
private authenticationService: AuthenticationService
private authenticationService: AuthenticationService,
private authService: AuthService
) {}
/**
@@ -78,6 +84,22 @@ export class LoginFormComponent implements OnInit {
.subscribe();
}
/**
* Authenticates the user if the credentials are valid to Zitadel.
*/
loginOIDC() {
this.authService.login();
}
getUsers() {
this.authService.getUsers();
}
logout() {
this.authService.logout();
}
/**
* Toggles the visibility of the password input field.
*