- Goal: I'm trying to set up OAuth 2.0 authentication for a Zoho CRM integration in my self-hosted Retool instance. The expected behavior is for the OAuth flow to complete successfully, allowing me to make authenticated requests to the Zoho CRM API.
I have followed the steps in the Solution by Ben (How to connect Retool with Zoho CRM)
and an error occurs after clicking on Connect With Oauth and the tokens are not returned to the resource
-
Steps:
-
Details:
It appears that Zoho is attempting to return tokens to Retool as part of the OAuth flow, but there's an issue preventing the process from completing successfully
The callback includes expected parameters:
The URL contains parameters like state
, code
, location
, and accounts-server
, which are typical for OAuth callbacks from Zoho (Steps for generating OAuth Token | OAuth | Access | Zoho People)
The nginx server encounters a timeout while trying to forward the request to the Retool API service. This suggests that the Retool API is not responding within the expected time frame.
The server hosting these containers is not under any load
The Retool docker-compose logs show:
{
"level": "info",
"message": {
"http": {
"method": "GET",
"url_base": "https://retool.backups.net.au",
"url_path": "/oauth/user/oauthcallback?state=e74a4dc6-e7d3-4eb5-9f10-e77226c25b3d&code=1000.feb08f6e6c9631f94f78373cbee84720.47f6d28f8e0efad43a1744d28d006807&location=au&accounts-server=https%3A%2F%2Faccounts.zoho.com.au&"
},
"type": "REQUEST_BEGIN"
},
"pid": 84,
"requestId": "4c440194-708a-49f6-82bd-ec635212742a",
"timestamp": "2024-10-03T00:53:52.038Z"
}
nginx_1 | 2024/10/03 00:54:51 [error] 29#29: *893 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 10.4.1.2, server: 10.4.1.31, request: "GET /oauth/user/oauthcallback?state=e74a4dc6-e7d3-4eb5-9f10-e77226c25b3d&code=1000.feb08f6e6c9631f94f78373cbee84720.47f6d28f8e0efad43a1744d28d006807&location=au&accounts-server=https%3A%2F%2Faccounts.zoho.com.au& HTTP/1.1", upstream: "http://172.23.0.2:3000/oauth/user/oauthcallback?state=e74a4dc6-e7d3-4eb5-9f10-e77226c25b3d&code=1000.feb08f6e6c9631f94f78373cbee84720.47f6d28f8e0efad43a1744d28d006807&location=au&accounts-server=https%3A%2F%2Faccounts.zoho.com.au&", host: "retool.backups.net.au", referrer: "https://accounts.zoho.com.au/"
nginx_1 | 10.4.1.2 - - [03/Oct/2024:00:54:51 +0000] "GET /oauth/user/oauthcallback?state=e74a4dc6-e7d3-4eb5-9f10-e77226c25b3d&code=1000.feb08f6e6c9631f94f78373cbee84720.47f6d28f8e0efad43a1744d28d006807&location=au&accounts-server=https%3A%2F%2Faccounts.zoho.com.au& HTTP/1.1" 504 569 "https://accounts.zoho.com.au/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
nginx_1 | 10.4.1.2 - - [03/Oct/2024:00:54:51 +0000] "GET /favicon.ico HTTP/1.1" 304 0 "https://retool.backups.net.au/oauth/user/oauthcallback?state=e74a4dc6-e7d3-4eb5-9f10-e77226c25b3d&code=1000.feb08f6e6c9631f94f78373cbee84720.47f6d28f8e0efad43a1744d28d006807&location=au&accounts-server=https%3A%2F%2Faccounts.zoho.com.au&" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36"
Additional context:
- Retool version 3.75.3
- I have reinstalled retool on a new server with 8 cores and 16GB RRAM and tried the steps again with same result
- Hosting environment: Self-hosted Docker deployment (dockerised, nginx, externalised postgres, ssl enabled)
- OAuth provider: Zoho CRM
The issue persists even with a different computer and browser.
I've consulted the Retool documentation on OAuth configuration and tried various troubleshooting steps, including verifying the BASE_DOMAIN setting and double-checking all OAuth credentials.
Any assistance in resolving this callback URL issue would be greatly appreciated.