Self Hosted SSO Fetch failing with PocketID provider

(#4478) Bug Closed: Answered security self-hosting

Thread

Comment by Hampus
HampusStaff 1 vote 2 replies
This looks like the API container is unable to reach id.example.com from inside Docker. The browser can, but the token exchange happens on the server and times out. Since both run on the same host, try mapping the name to the host via rexctl config edit:
services:
  api:
    extra_hosts:
      - "id.example.com:host-gateway"
You can confirm this first by running:
docker exec <your api container> node -e "fetch('https://id.example.com/.well-known/openid-configuration').then(r=>console.log(r.status)).catch(e=>console.log(e.cause))"
If that hangs or errors, it would be a network issue. The next update here also will have a clearer error message for this stating that the provider didn't send a response!
Comment by sparajoy
sparajoy OP1 vote 1 reply
This was exactly the problem, and it's fixed now! Thanks for the fast response!
Comment by Hampus
HampusStaff 1 vote
cool! I'm adding a check for this to rexctl doctor as well