I have appSetting.js file that contain code like
var appSettings = {
oauth: {
issuer: 'https://sts.windows.net/.../',
resource: 'api://...',
clientId: 'd44fewd3-xyzw',
logoutUrl: window.location.origin + '/index.html',
redirectURI: window.location.origin`enter code here`
}
};
and authConfig.ts file like this
import { AuthConfig } from 'angular-oauth2-oidc';
import { environment } from 'src/environments/environment';
export const authConfig: AuthConfig = {
// issuer: 'https://sts.windows.net/xyz/', //this (static value) line is working for unit test case fine
issuer: (window as any).appSettings.oauth.issuer, // but this (dynamic value) line is not working
// clientId: 'd44fewd3-xyzw',
clientId: (window as any).appSettings.oauth.issuer,
};
it throw error like this.