"Unable to authenticate you"

Hi, I’m reaching out because I’m having trouble connecting my Rails app to Forest Admin. I’ve gone through the whole process with success and am able to access ForestAdmin in Development but when I try to switch to Production environment, I get an error message saying “Please verify that your admin backend is correctly configured and running, and that you have access to the internet.” I’ve checked that my API keys are correct in Production. I have no idea what is going wrong and how I can solve it.
Has anyone encountered this issue before ? Thanks !

Hey @Raphael, and welcome to our community

Could you share your project name so I can check your configuration on my end?
Is your project recent? Maybe you are impacted by this issue?

Let me know if it help :pray:

Hey @jeffladiray, thanks for responding! My project’s name is Lighthouse-Music. I’m looking into the link you sent me but getting nowhere so far

If you can, it could also help to have a screenshot of the network console on the call that is failing to authenticate (Both request & response).

Here are the network console screen shots. I have now found that the problem comes from the SSL certificat and followed this article (Trouble logging in | ForestAdmin) to try and resolve it, however I still get the error…

It seems indeed related to the let’s encrypt issue.

I would suggest to try:

  • if you are using docker in production, run a curl https://api.forestadmin.com from the host & inside the container
  • if you are not using docker in production, just run a curl https://api.forestadmin.com on your production machine

Depending on the response (404 or SSL issue), share the response here and I will help to further investigate :slight_smile:

If you want, we also have a lot of thread discussing about this issue with a few different solutions (That are depend on the way you are hosting your production environment).

(Search for either SSL/Let’s encrypt related threads)

here’s what I get from running https://api.forestadmin.com/

I’ll look into the other threads thanks !

From your production environment, right?

(I shared a bunch of thread since they are a lot of way to find exactly where the issue is coming from, but I’m happy to help if required).

The issue is related to the HTTPClient gem (See the the associated github issue).
The monkey patch proposed in the Github issue is the one we deploy (In the Release v6.6.3 · ForestAdmin/forest-rails · GitHub), however it’ll still not work if your root ca list on your hosting provider is not up to date.

I can spot that you are still running 6.3.2, so in your case, an update to the latest 6.6.3 of the forest-rails gem may be enough :slight_smile: