Unable to authenticate using Laravel

Feature(s) impacted

General setup.

Observed behavior

Upon installing the PHP package into my Laravel application (locally), Forest Admin says " We can’t reach your server. Please check that your admin backend is correctly configured and running."

Expected behavior

The ability to use Forest Admin with my new laravel application.

Failure Logs

[2022-12-07T04:49:16.116477+00:00] local.DEBUG: POST /forest/authentication - Body: {“renderingId”:“168524”} - Headers: {“host”:[“localhost:9001”],“user-agent”:[“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/107.0”],“accept”:[“/”],“accept-language”:[“en-US,en;q=0.5”],“accept-encoding”:[“gzip, deflate, br”],“referer”:[“https://app.forestadmin.com/”],“content-type”:[“application/json; charset=utf-8”],“content-length”:[“24”],“origin”:[“https://app.forestadmin.com”],“connection”:[“keep-alive”],“sec-fetch-dest”:[“empty”],“sec-fetch-mode”:[“cors”],“sec-fetch-site”:[“cross-site”]} - Files: {“ip”:“127.0.0.1”,“request_id”:“e1e9c200-7dbd-46ad-92d5-1b9b25e512ca”,“hostname”:“Jakes-MacBook-Air.local”}
[2022-12-07T04:49:17.916016+00:00] local.ERROR: The registration to the authentication API failed, response: {“ip”:“127.0.0.1”,“request_id”:“e1e9c200-7dbd-46ad-92d5-1b9b25e512ca”,“hostname”:“Jakes-MacBook-Air.local”,“exception”:“[object] (ForestAdmin\LaravelForestAdmin\Exceptions\ForestApiException(code: 0): The registration to the authentication API failed, response: at /Users/jake/projects/distro/foundation/apps/platform/vendor/forestadmin/laravel-forestadmin/src/Auth/OidcClientManager.php:67)”}

Context

php artisan serve --port 9001
:deciduous_tree::deciduous_tree::deciduous_tree: Apimap Received

  • Project name: Distro
  • Team name: Distro
  • Environment name: Development
  • Agent type & version: forestadmin/laravel-forestadmin: 1.2.2
  • Recent changes made on your end if any: N/A

Hi @Jake_Toolson and welcome to our community :wave:,

This looks like a problem with an incorrect ENV_SECRET.

Did you get an error when you ran the command php artisan forest:setup-keys during the onboarding ?

1 Like

Hi @nicolasa - I received no error when generating the keys. They are in my .env file. The FOREST_ENV_SECRET matches what I see in the https://app.forestadmin.com/distro/settings/environments/details/Development page.

I just tried this morning, it it appears to be connecting :slight_smile: No idea why now haha.

1 Like