Best answer

Oauth2 authorization_code issue

  • 19 January 2021
  • 2 replies
  • 442 views

Userlevel 1

Hello, I’m building a private integration for my company. I’m hosting a SSO on localhost on port 44310.
When I try to “Test your Authentication Configuration” I always get one of those errors : 

  • request to https://localhost:44310/connect/token failed, reason: connect ECONNREFUSED 127.0.0.1:44310 What happened (You are seeing this because you are an admin): Starting POST request to https://localhost:44310/connect/token request to https://localhost:44310/connect/token failed, reason: connect ECONNREFUSED 127.0.0.1:44310 Console logs: Stack trace: FetchError: request to https://localhost:44310/connect/token failed, reason: connect ECONNREFUSED 127.0.0.1:44310 at ClientRequest.<anonymous> (/var/task/node_modules/node-fetch/lib/index.js:1455:11) at ClientRequest.emit (events.js:198:13) at ClientRequest.EventEmitter.emit (domain.js:448:20) at TLSSocket.socketErrorListener (_http_client.js:401:9) at TLSSocket.emit (events.js:198:13) at TLSSocket.EventEmitter.emit (domain.js:448:20) at emitErrorNT (internal/streams/destroy.js:91:8) at emitErrorAndCloseNT (internal/streams/destroy.js:59:3) at process._tickCallback (internal/process/next_tick.js:63:19)
  • Or something saying that the state parameter is different



I have tested the same parameters on postman and it works so I have no idea of what could be the problem. Of course the server is up ( as a proof, before calling https://localhost:44310/connect/token, zapier calls https://localhost:44310/connect/authorize and gets the authorization code ( in url ) ) 

 

If anyone know how I can fix this… Thank you ! 

ps : the SSO is an IdentityServer4 solution ( Skoruba )

icon

Best answer by ikbelkirasan 24 January 2021, 06:23

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +12

Hi @sub150 - It seems that you're trying to connect to localhost which is only accessible on your machine. In order for this to work in Zapier, you will have to make it accessible via a public IP.

Userlevel 1

Hi @sub150 - It seems that you're trying to connect to localhost which is only accessible on your machine. In order for this to work in Zapier, you will have to make it accessible via a public IP.

Yes, I was very tired that day, I figured out what I was doing the next day… Thank you