OAuth 2.0 authentication not working for homolog environment

  • Goal: I'm trying to enable OAuth 2.0 authentication for a Google Spreadsheet resource that is currently working on production and staging environments. I get an error while trying to connect via UI on homolog environment (again, both staging and production are fine):

{ "error": "{"statusCode":400,"data":"{\n \"error\": \"invalid_request\",\n \"error_description\": \"client_secret is missing.\"\n}"}", "request": { "url": "www.googleapis.com/oauth2/v4/token", "method": "POST", "headers": { "Content-Type": "application/x-www-form-urlencoded", "Host": "www.googleapis.com", "User-Agent": "Node-oauth", "Content-Length": 276 }, "body": { "grant_type": "authorization_code", "redirect_uri": "https://oauth.retool.com/oauth/oauthcallback", "client_id": "716367306867-d861tjqj92gjb0uphcjt8gu2nvtf6e9t.apps.googleusercontent.com", "client_secret": "---sanitized---", "code": "---sanitized---" } } }

GPT says that I have to override the default Google OAuth client ID and secret for our built-in Google Sheets integration, and says that this is a feature flag that you guys need to set to our account so we can see the options for doing that.

  • Steps: 1) Under Google Spreadsheet resource, try to authorize it via OAuth 2.0 (in my case on Homolog environment, there are other two environments where the authorization is ok: staging and production)

Hi @Interliche,
I have been able to reproduce what is happening to you. This is bug that Retool only allows two environments and I will file a bug report.

As a workaround, you can use Service Account auth instead of Oauth. I have tested this and it works on three environments. Check out these docs and read up on Service Account authorization.

@Interliche ,
When I am filing a bug with engineering, I'd like to be able to explain how this bug has impacted you as an enduser. It would be helpful if you could help me explain why it's important for you to have the use of 3 environments for your Google Spreadsheets resource and prefer to use Oauth as opposed to Service Account for authorization and how this has impacted your work. Thanks very much.