I use msal to do authentication. In my AppModule.ts (from the example)
@NgModule({
declarations: [
AppComponent,
HomeComponent,
ProfileComponent
],
imports: [
BrowserModule,
AppRoutingModule,
MsalModule.forRoot( new PublicClientApplication({
auth: {
clientId: 'Enter_the_Application_Id_here', // This is your client ID
authority: 'Enter_the_Cloud_Instance_Id_Here'/'Enter_the_Tenant_Info_Here', // This is your tenant ID
redirectUri: 'Enter_the_Redirect_Uri_Here'// This is your redirect URI
},
cache: {
cacheLocation: 'localStorage',
storeAuthStateInCookie: isIE, // Set to true for Internet Explorer 11
}
}), null, null)
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
For the clientId, I don't want to hard code here. It is in the a config file. The question is that I have different environment such as dev/qa and prod etc. The clientId is different in each endpoint.
How to pass the value rather than hardcode to AppModule?