This commit is contained in:
Diamantis Tziotzios 2024-07-15 17:02:05 +03:00
parent 287c016c89
commit ee494e19c6
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ const cookieConfig: NgcCookieConsentConfig = {
type: 'info'
};
export function InstallationConfigurationFactory(appConfig: ConfigurationService, keycloak: KeycloakService, authService: AuthService, languageService: LanguageService, tenantHandlingService: TenantHandlingService) {
export function InstallationConfigurationFactory(appConfig: ConfigurationService, keycloak: KeycloakService, authService: AuthService, languageService: LanguageService, tenantHandlingService: TenantHandlingService, router: Router) {
return () => appConfig.loadConfiguration().then(() => {
return languageService.loadAvailableLanguages().toPromise();
}).then(x => keycloak.init({
@ -112,7 +112,7 @@ export function InstallationConfigurationFactory(appConfig: ConfigurationService
const token = keycloak.getToken();
return authService.prepareAuthRequest(from(token), tenantCode, { params }).toPromise().catch(error => {
authService.onAuthenticateError(error);
window.location.pathname = "/";
router.navigate(['/']);
});
}));
}