Dealing with Error 'Unknown authentication strategy "openid"' when Logging in with OpenID under Proxy Environment #1264
Replies: 2 comments 2 replies
-
Thanks for your issue. Due to the highly specific nature of this configuration, I've moved it to a discussion as I can't set it up nor debug under the same configuration. If anyone with the same configuration runs into this, it will be found here.
This project is not using Next.js. |
Beta Was this translation helpful? Give feedback.
-
dear @danny-avila |
Beta Was this translation helpful? Give feedback.
-
Contact Details
microdairen@gmail.com
What happened?
Under a proxy environment with
ALLOW_SOCIAL_LOGIN
set totrue
and various OpenID settings (such asOPENID_CLIENT_ID
) configured, runningdocker-compose up
results in the following errors:Moreover, when clicking on "Login with OpenID" on the UI, the screen displays "Internal Server Error" and logs the error below, preventing successful login:
Detailed steps to reproduce are listed below, but the issue occurs under the following conditions:
api
,mongodb
,meilisearch
services assigned to Internal Networksquid
as a proxy andhaproxy
as a reverse proxy service added, assigned to both Internal and Bridge NetworksThe issue has been resolved in the following two ways, suggesting that the OpenID related code is not compatible with proxy environments:
api
,mongodb
,meilisearch
services from Internal Network to Bridge Network results in successful OpenID authentication.api/strategies/openidStrategy.js
to include proxy settings viaglobal-agent
also leads to successful authentication.Due to limited knowledge in next.js, it's unclear if providing
global-agent
inopenidStrategy.js
is appropriate, hence this is posted as a bug issue instead of a pull request.Steps to Reproduce
Prepare
haproxy.cfg
with the following content:Set up the
.env
file with mainly the following changes:Modify
docker-compose.yml
slightly:Execute
docker-compose up
.After startup, the error
RPError: outgoing request timed out after 3500ms
is logged.Access the application in a browser and press "Login with OpenID." This results in an "Internal Server Error" on the screen and the error
Error: Unknown authentication strategy "openid"
in the logs.What browsers are you seeing the problem on?
Chrome
Relevant log output
Immediately After Service Startup:
After Clicking on 'Login with OpenID':
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions