Authentication error after migrating to forest-express-sequelize v7

Hello @GuillaumeGautreau Thanks for a quick reply!

After removing FOREST_CLIENT_ID env variable I’m receiving a following error on backend when calling /forest/authentication

app_1       | [forest] 🌳🌳🌳  Unable to register the client
app_1       | {
app_1       |   "configuration": {
app_1       |     "authorization_endpoint": "https://api.forestadmin.com/oidc/auth",
app_1       |     "device_authorization_endpoint": "https://api.forestadmin.com/oidc/device/auth",
app_1       |     "claims_parameter_supported": false,
app_1       |     "claims_supported": [
app_1       |       "sub",
app_1       |       "email",
app_1       |       "sid",
app_1       |       "auth_time",
app_1       |       "iss"
app_1       |     ],
app_1       |     "code_challenge_methods_supported": [
app_1       |       "S256"
app_1       |     ],
app_1       |     "end_session_endpoint": "https://api.forestadmin.com/oidc/session/end",
app_1       |     "grant_types_supported": [
app_1       |       "authorization_code",
app_1       |       "urn:ietf:params:oauth:grant-type:device_code"
app_1       |     ],
app_1       |     "id_token_signing_alg_values_supported": [
app_1       |       "HS256",
app_1       |       "RS256"
app_1       |     ],
app_1       |     "issuer": "https://api.forestadmin.com",
app_1       |     "jwks_uri": "https://api.forestadmin.com/oidc/jwks",
app_1       |     "registration_endpoint": "https://api.forestadmin.com/oidc/reg",
app_1       |     "response_modes_supported": [
app_1       |       "query"
app_1       |     ],
app_1       |     "response_types_supported": [
app_1       |       "code",
app_1       |       "none"
app_1       |     ],
app_1       |     "scopes_supported": [
app_1       |       "openid",
app_1       |       "email",
app_1       |       "profile"
app_1       |     ],
app_1       |     "subject_types_supported": [
app_1       |       "public"
app_1       |     ],
app_1       |     "token_endpoint_auth_methods_supported": [
app_1       |       "none"
app_1       |     ],
app_1       |     "token_endpoint_auth_signing_alg_values_supported": [],
app_1       |     "token_endpoint": "https://api.forestadmin.com/oidc/token",
app_1       |     "request_object_signing_alg_values_supported": [
app_1       |       "HS256",
app_1       |       "RS256"
app_1       |     ],
app_1       |     "request_parameter_supported": false,
app_1       |     "request_uri_parameter_supported": true,
app_1       |     "require_request_uri_registration": true,
app_1       |     "claim_types_supported": [
app_1       |       "normal"
app_1       |     ]
app_1       |   },
app_1       |   "registration": {
app_1       |     "redirect_uris": [
app_1       |       "http://localhost:8000/admin/forest/authentication/callback"
app_1       |     ],
app_1       |     "token_endpoint_auth_method": "none"
app_1       |   },
app_1       |   "error": {
app_1       |     "name": "RequestError",
app_1       |     "code": "ECONNREFUSED",
app_1       |     "timings": {
app_1       |       "start": 1620301581680,
app_1       |       "socket": 1620301581683,
app_1       |       "lookup": 1620301581685,
app_1       |       "error": 1620301581686,
app_1       |       "phases": {
app_1       |         "wait": 3,
app_1       |         "dns": 2,
app_1       |         "total": 6
app_1       |       }
app_1       |     }
app_1       |   }
app_1       | }
app_1       | [forest] 🌳🌳🌳  Unexpected error: connect ECONNREFUSED 127.0.0.1:443
app_1       | {
app_1       |   "name": "RequestError",
app_1       |   "code": "ECONNREFUSED",
app_1       |   "timings": {
app_1       |     "start": 1620301581680,
app_1       |     "socket": 1620301581683,
app_1       |     "lookup": 1620301581685,
app_1       |     "error": 1620301581686,
app_1       |     "phases": {
app_1       |       "wait": 3,
app_1       |       "dns": 2,
app_1       |       "total": 6
app_1       |     }
app_1       |   },
app_1       |   "stack": "RequestError: connect ECONNREFUSED 127.0.0.1:443\n    at ClientRequest.<anonymous> (/app/admin/node_modules/got/dist/source/core/index.js:956:111)\n    at Object.onceWrapper (events.js:422:26)\n    at ClientRequest.emit (events.js:327:22)\n    at ClientRequest.origin.emit (/app/admin/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20)\n    at TLSSocket.socketErrorListener (_http_client.js:426:9)\n    at TLSSocket.emit (events.js:315:20)\n    at emitErrorNT (internal/streams/destroy.js:92:8)\n    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)\n    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)"
app_1       | }

Request headers:

POST /admin/forest/authentication HTTP/1.1
Host: localhost:8000
Connection: keep-alive
Content-Length: 23
Pragma: no-cache
Cache-Control: no-cache
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="90", "Google Chrome";v="90"
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36
Content-Type: application/json; charset=utf-8
Accept: */*
Origin: http://app.forestadmin.com
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://app.forestadmin.com/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8

Request payload:

{"renderingId":"76844"}

Response headers:

HTTP/1.1 500 Internal Server Error
X-Protected-By: Sqreen
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Download-Options: noopen
X-Powered-By: Express
Access-Control-Allow-Origin: http://app.forestadmin.com
Vary: Origin
Access-Control-Allow-Credentials: true
Content-Type: application/json; charset=utf-8
Content-Length: 95
ETag: W/"5f-f38xyTWwHTfC5Wzl2VaRpthnnTI"
Date: Thu, 06 May 2021 11:46:21 GMT
Connection: keep-alive