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’);
}
});
// ExpressOIDC attaches handlers for the /login and /authorization-code/callback routes
app.use(oidc.router);