Sostituito frontend angular new con frontend angular. Sostituito frontend angular con frontend angular old

This commit is contained in:
Lorenzo Sanesi
2026-08-10 13:10:18 +02:00
parent 3d4eac4ea5
commit 0ed70eaa18
54 changed files with 7685 additions and 12730 deletions
+36
View File
@@ -0,0 +1,36 @@
import '@angular/compiler';
import { bootstrapApplication } from '@angular/platform-browser';
import { provideZonelessChangeDetection } from '@angular/core';
import { provideHttpClient, withFetch, withInterceptors } from '@angular/common/http';
import Keycloak from 'keycloak-js';
import { AppComponent } from './src/app.component';
import { KEYCLOAK_INSTANCE } from './src/core/tokens/keycloak.token';
import { authInterceptor } from './src/core/interceptors/auth.interceptor';
const keycloak = new Keycloak({
url: 'http://localhost:8080',
realm: 'scommettiapp',
clientId: 'scommetti-frontend',
});
keycloak.init({
onLoad: 'login-required',
checkLoginIframe: false,
pkceMethod: 'S256',
}).then(authenticated => {
if (!authenticated) {
keycloak.login();
return;
}
bootstrapApplication(AppComponent, {
providers: [
provideZonelessChangeDetection(),
provideHttpClient(withFetch(), withInterceptors([authInterceptor])),
{ provide: KEYCLOAK_INSTANCE, useValue: keycloak },
],
}).catch(err => console.error(err));
}).catch(err => {
console.error('Keycloak initialization failed:', err);
});