But it is unclear to me what the models and connection variables should be, could you please provide more information ? Maybe if there is a demo app somewhere on github I could use that as a reference.
I am also getting the following warning when running the app:
[forest] 🌳🌳🌳 Your configDir ("/Users/camillefeghali/dev/foxxbee/fa-demo-mac-sequelize/forest") does not exist. Please make sure it is set correctly.
Which lends me to believe that I should create a /forest directory in my project, but nowhere in the installation steps is that mentioned.
Hey @anon79585656, thanks for the quick reply.
That worked, thank you. I am now facing another issue. When trying to access my admin panel, I get the following screen:
In the onboarding it states that if cors is enabled I should add the snippet.
I tried many options:
1 - Not adding the app.use('^(?!forest/?$).*', cors(corsOptions)); because I don’t have cors enabled.
2 - Enabling cors and adding app.use('^(?!forest/?$).*', cors()); => Note that I do not pass a corsOptions variable, as it is not described in the wizard what that var should hold
3 - Adding the following code (taken from a standalone PostgreSQL installation app) installed using lumber:
let allowedOrigins = [
/\.forestadmin\.com$/,
/localhost:\d{4}$/,
"^(?!forest/?$).*",
];
const corsConfig = {
origin: allowedOrigins,
maxAge: 86400, // NOTICE: 1 day
credentials: true,
};
app.use(
"/forest/authentication",
cors({
...corsConfig,
// The null origin is sent by browsers for redirected AJAX calls
// we need to support this in authentication routes because OIDC
// redirects to the callback route
origin: corsConfig.origin.concat("null"),
})
);
app.use(cors(corsConfig));
It seems that the last authentication step is failing. Can you confirm that the /forest/authentication is OK ? And only the /forest/authentication/callback fails ?
I have more questions to find the culprit.
On which PORT do you run your application ?
Did you define the environment variables during the onboarding process (FOREST_ENV_SECRET, FOREST_AUTH_SECRET, APPLICATION_URL) ?
The APPLICATION_URL is used to create the callback URL. If you specified a specific url for your application in place of the default one (for example for an install on a remote machine), this url should be set to the right URL to reach your app.
If think we miss some documentation during the onboarding. I’ll talk to my teammate to review this step. Thanks for the head up.