baseURL missing

blog-journal/node_modules/@okta/configuration-validation/dist/lib.js:144
throw new ConfigurationValidationError(‘Your appBaseUrl is missing.’);
^

Error: Your appBaseUrl is missing.
at new ConfigurationValidationError (/Users/leeannehammond/Desktop/blog-journal/node_modules/@okta/configuration-validation/dist/lib.js:29:141)

This is my code in app.js(I’m using express and Node.JS with MongoDB) ::
app.use(session({
secret: ‘this should be secure’,
resave: true,
saveUninitialized: false
}));

const oidc = new ExpressOIDC({
issuer: ‘https://${L.Hammond}/oauth2/default’,
client_id: ‘{0oad5ixgh0JmHhkwB4x6}’,
client_secret: ‘{REDACTED}’,
redirect_uri: ‘http://localhost:8080/authorization-code/callback’,
scope: ‘openid profile’
});
app.all(’*’, oidc.ensureAuthenticated());

app.get(’/’, (req, res) => {
if (req.userContext.userinfo) {
res.send(Hi ${req.userContext.userinfo.name}!);
} else {
res.send(‘Please Sign In’);
}
});

Log In

// ExpressOIDC attaches handlers for the /login and /authorization-code/callback routes
app.use(oidc.router);

Hi @leeluuu,

I think the issue here is that you’re including the brackets in your clientID and clientSecret parameters.
Remove the brackets from the config and try again.
Your config should look like this

const oidc = new ExpressOIDC({
  issuer: ‘https://L.Hammond/oauth2/default’,
  client_id: ‘0oad5ixgh0JmHhkwB4x6’,
  client_secret: ‘REDACTED’,
  redirect_uri: ‘http://localhost:8080/authorization-code/callback’,
  scope: ‘openid profile’
});

Unfortunately the error message is something else.
Try this and let us know.
Also, make sure not to paste your client secret in public forums. If someone gets hold of your org name as well, it’s a security issue.