fix
This commit is contained in:
parent
287c016c89
commit
ee494e19c6
|
@ -80,7 +80,7 @@ const cookieConfig: NgcCookieConsentConfig = {
|
||||||
type: 'info'
|
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 () => appConfig.loadConfiguration().then(() => {
|
||||||
return languageService.loadAvailableLanguages().toPromise();
|
return languageService.loadAvailableLanguages().toPromise();
|
||||||
}).then(x => keycloak.init({
|
}).then(x => keycloak.init({
|
||||||
|
@ -112,7 +112,7 @@ export function InstallationConfigurationFactory(appConfig: ConfigurationService
|
||||||
const token = keycloak.getToken();
|
const token = keycloak.getToken();
|
||||||
return authService.prepareAuthRequest(from(token), tenantCode, { params }).toPromise().catch(error => {
|
return authService.prepareAuthRequest(from(token), tenantCode, { params }).toPromise().catch(error => {
|
||||||
authService.onAuthenticateError(error);
|
authService.onAuthenticateError(error);
|
||||||
window.location.pathname = "/";
|
router.navigate(['/']);
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue