WEB-233: Improve the OIDC integration with 2FA (#2616)
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user