Can you send me the 5 last characters of your env secret, and your project’s name? I’ll check that they are correct.
Also, could you add a console.log("Env secret", process.env.FOREST_ENV_SECRET) before the call to forest.init just to check that its value is correctly initialized?
Yes, because the regexp that you’re using to configure this middleware does not match the actual path:
Regex: ^(?!forest/?$).*
Path: admin/forest/authentication
These cors are handled by forest-express I guess.
Now, the more problematic thing I can see with your configuration, is that it seems that the current version of forest-express-sequelize does not support well being used as a sub-path of your api.
Can you check if you can simply use the route /forest instead of /admin/forest? Is it something possible in your case?
For information, all routes handled by forest-express-sequelize are already under the /forest prefix.
In order to work, these requests must have an answer. There is probably a problem with the configuration of your server regarding how these requests are handled.
I have a hard time understanding what should our server do after initialization of forest. Should the route /forest/authentication/ return something from our server? Or should forest generate the appropriate routes? Sorry for the taking so long and thank you for the help so far
This error message is related to the place where the agent will save the file forestadmin-schema.json. Make sure that the path is correct and that the directory exists because forest-express will not create it for you.
I don’t know if it’s related to your problem, but it might worth trying to solve this error first, just in case.
I created the directory, so the error went away, but it’s still not going through. I also tried to stub the route /forest/authentication so that it returns a 204 status code, but still no luck. Should the route /forest/authentication/ be handled somehow manually on the server (guess that’s a dumb question, as it should return something) ?
Have you been able to log in once on your project?
What is the step you are stuck on right now?
Are the FOREST_ENV_SECRET and FOREST_AUTH_SECRET well defined in your .env file?
@lclisson The secrets are defined correctly, and passed to the init method. The step i’m stuck on right now is, as mentioned before, the authentication process: