using angular-auth-oidc-client call /api/config endpoint to receive something like ```csharp app.MapGet("/api/config/auth", (IConfiguration config) => Results.Ok(new { Authority = config["Authentication:Authority"], ClientId = config["Authentication:ClientId"], Scope = config["Authentication:Scope"] })); ``` based on these info populate the config tokens ```ts // main.ts import { bootstrapApplication } from '@angular/platform-browser'; import { AppComponent } from './app/app.component'; import { appConfig } from './app/app.config'; import { AUTH_CONFIG_TOKEN } from './app/auth-config.token'; async function bootstrap() { // Fetch C# backend settings const response = await fetch('/api/config/auth'); const authConfig = await response.json(); bootstrapApplication(AppComponent, { providers: [ ...appConfig.providers, { provide: AUTH_CONFIG_TOKEN, useValue: authConfig } ] }); } bootstrap().catch(err => console.error(err)); ```
Activity