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
+22 -3
View File
@@ -2,7 +2,13 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpBackend, HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import {
HttpBackend,
HttpClient,
provideHttpClient,
withInterceptorsFromDi,
HTTP_INTERCEPTORS
} from '@angular/common/http';
/** Environment Configuration */
@@ -47,6 +53,12 @@ import {
} from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { AuthenticationInterceptor as TokenInterceptor } from './core/authentication/authentication.interceptor';
import { TokenInterceptor as ZitadelTokenInterceptor } from './zitadel/token.interceptor';
import { AuthService } from './zitadel/auth.service';
import { environment } from '../environments/environment';
import { CallbackComponent } from './zitadel/callback/callback.component';
export class CustomMissingTranslationHandler implements MissingTranslationHandler {
handle(params: MissingTranslationHandlerParams): string {
// Remove the 'labels.catalogs.' prefix and return the fallback value
@@ -107,11 +119,18 @@ export function HttpLoaderFactory(http: HttpClient) {
TasksModule,
ConfigurationWizardModule,
AppRoutingModule,
NotFoundComponent
NotFoundComponent,
CallbackComponent
],
providers: [
DatePipe,
provideHttpClient(withInterceptorsFromDi())]
AuthService,
{
provide: HTTP_INTERCEPTORS,
useClass: !environment.OIDC.oidcServerEnabled ? TokenInterceptor : ZitadelTokenInterceptor,
multi: true
}
]
})
export class AppModule {}