I wanted to use the openid-client npm package server-side in my Meteor app but found that it doesn’t work because the http helper package it uses (https://www.npmjs.com/package/got) misbehaves.
I have traced it down so that just a simple call in a server unit test fails when it tries to connect to localhost:443 instead of the provided host.
const gotResponse = await got( "https://accounts.google.com/.well-known/openid-configuration" ); // crashes with RequestError: connect ECONNREFUSED 127.0.0.1:443
I am fairly sure this is because of its internal promise usage (haven’t tracked it down completely) but I wouldn’t even know where to start fixing it.
Has anyone else successfully used got?
Seems I was chasing down the wrong hole, this was caused by another library patching the https package and breaking it (travis-ci’s agent-base)