Trying to follow the example code provided in the handbook, but encountering an error with the first example app already.
This code snippet:
const {OIDC_PROVIDER} = process.env;
const discEnd = ‘https://${OIDC_PROVIDER}/.well-known/openid-configuration’;
request(discEnd).then((res) => {
oidcProviderInfo = JSON.parse(res);
app.listen(3000, () => {
console.log(‘Server running on http://localhost:3000’);
});
}).catch((error) => {
console.error(error);
console.error(‘Unable to get OIDC endpoints for ${OIDC_PROVIDER}’);
process.exit(1);
});
Throws an error that the OIDC_PROVIDER can’t be resolved"
Unable to get OIDC endpoints for ${OIDC_PROVIDER}
While the OIDC_PROVIDER is correctly read from the .env file, the value is not correctly propagated through the code, for example examining the discEnd constant yields this:
‘https://${OIDC_PROVIDER}/.well-known/openid-configuration’
instead of “https://‘actual value of OIDC_PROVIDER’/.well-known/openid-configuration” …
Any ideas?