So the issue with ECONNREFUSED error and request to localhost was caused by 3-rd party packages using agent-base
package (I had to update all of them to fix the issue). The original issue with callback url not working remains.
For anyone else who’ll get here after having ECONNREFUSED error when requesting 127.0.0.1:443: run npm ls agent-base
and try to update all of packages which are using agent-base
package.