I have 2 html pages index.html and login.html page. index.html page is used by the angular app, Is there a way to inject or access environment values in login.html page?
I don't want to repeat the envrionment settings twice as they may go out of sync.
Edit Login page markup is below. In the below code I need to change authority, redirect_uri by the environment in which it is running. Index.html page which runs angular uses environment.ts files to store environment specific urls and at build time it compiles the project with those settings. The problem I am having is that I cannot access environment.ts variables outside angular.
<head>
<script src="assets/scripts/oidc-client.min.js"></script>
<script type="text/javascript">
function onUserLoggedOut(arg) {
const settings = {
authority: 'http://localhost:2228',
client_id: '#####',
redirect_uri: 'http://localhost:4200/auth.html',
post_logout_redirect_uri: 'http://localhost:4200',
response_type: 'id_token token',
scope: 'openid',
monitorSession: true,
silent_redirect_uri: 'http://localhost:4200/silent-renew.html',
automaticSilentRenew: false,
silentRequestTimeout: 30000,
accessTokenExpiringNotificationTime: 30,
filterProtocolClaims: true,
loadUserInfo: true,
acr_values: 'tenant:1'
};
(new Oidc.UserManager(settings)).signinRedirect(tenant_acr).then((resp) => {
});
}
</script>
</head>
<body>
<iframe src="http://localhost:2228/Account/Logout" onload="onUserLoggedOut(this)" >
</iframe>
</body>