Minor fixes #5

This commit is contained in:
Marek Lesko
2025-08-01 08:38:44 +02:00
parent 0ab0402172
commit 2f86edb5e6
3 changed files with 11 additions and 10 deletions

View File

@@ -2,8 +2,8 @@ import { ApplicationConfig, inject, provideAppInitializer, provideBrowserGlobalE
import { provideRouter } from '@angular/router';
import { routes } from './app.routes';
import { provideHttpClient } from '@angular/common/http';
import { provideOAuthClient } from 'angular-oauth2-oidc';
import { HTTP_INTERCEPTORS, provideHttpClient } from '@angular/common/http';
import { DefaultOAuthInterceptor, provideOAuthClient } from 'angular-oauth2-oidc';
import { AppConfigService } from './services/config.service';
export const appConfig: ApplicationConfig = {
@@ -15,9 +15,14 @@ export const appConfig: ApplicationConfig = {
provideHttpClient(),
provideOAuthClient({
resourceServer: {
allowedUrls: ['http://localhost:5000'],
allowedUrls: ['http://localhost:5000', 'https://localhost:5001', 'https://centrum.lesko.me'],
sendAccessToken: true,
},
})
}),
{
provide: HTTP_INTERCEPTORS,
useClass: DefaultOAuthInterceptor,
multi: true,
}
]
};

View File

@@ -9,11 +9,7 @@ import { AppConfigService } from './services/config.service';
imports: [RouterOutlet],
providers: [
OAuthService,
{
provide: HTTP_INTERCEPTORS,
useClass: DefaultOAuthInterceptor,
multi: true,
}],
],
templateUrl: './app.html',
styleUrl: './app.scss'
})