GCP oauthcallback wrong redirect URL?

Hello,

After setting up the free version, I'm getting error on outh

Error 400: redirect_uri_mismatch
redirect_uri=https://{domain_name}/oauthcallback

When I add it to authorized URIs on the client OAuth side it seem to work.
However following are documented on Create a Google OAuth client

BASE_URL/oauth/oauthcallback
BASE_URL/oauth/user/oauthcallback

My app version is 3.2.3

Should the URIs be
BASE_URL/oauthcallback
BASE_URL/user/oauthcallback

Cheers

Hey @Marcin_Kubica!

The correct redirect URL should appear on your resource configuration page:

Would you mind sharing your resource setup with sensitive information redacted? I'm curious to see exactly how things are configured :thinking:

Hi @Kabirdas

I'm struggling to find 'resource configuration page'. I'm using free version

On Settings - Advanced I only see

  • Authentication Options
  • Preloaded JavaScript
  • Preloaded CSS
  • Libraries
  • Cache queries across all users
  • Disable AI Support Bot
  • Check License Key

image

Hey @Marcin_Kubica! Apologies for the misunderstanding and the late reply. I was assuming you were setting up a resource connection in Retool, not SSO for the instance itself.

It looks like there is actually a known issue with the documentation, thanks for bumping it here!

Hi @Kabirdas,

Any plans to fix the documentation?

What are the correct values, please?

Thanks
Marcin

You'll need to add BASE_URL/oauthcallback in order to log in to Retool, however BASE_URL/oauth/user/oauthcallback and BASE_URL/oauth/oauthcallback are still needed for resource-level authentication. The first is for user-specific resource auth and the second is for shared credentials.

We'll try and get the docs fixed to reflect that information!

It appears the docs are still incorrect, just FYI.

@username_9102 thank you for bumping this!

Which docs and are they missing a route?

Is it this first docs or these second docs?

Will ping our docs team right now to update accordingly.

The first doc

We tried to set up Google SSO but got this error during login

Error 400: invalid_request

Request details: redirect_uri={BASE_URL}/oauthcallback flowName=GeneralOAuthFlow

I had to add these URIs for it to work

  • {BASE_URL}/oauthcallback
  • {BASE_URL}/oauth
  • {BASE_URL}/oauthcallback/mobile

Hello @YilinDS are you using Retool Cloud?

I believe the docs refer to those routes you listed being needed if you are Retool Cloud.

What routes where you using for redirect when you got the 400 error?