Google OAuth redirect_uri with port

Hi

We’ve set up Appsmith on our own server. Our server manager assigned xxx.org:30000 (port 30000) as the URL to use for Appsmith (he uses Docker). Appsmith runs fine before we set up Google OAuth login.

Then we wanted to use Google Authentication for sign in. So we set up a project in our Google Cloud and changed the following lines accordingly in docker.env:
APPSMITH_OAUTH2_GOOGLE_CLIENT_ID=xxx
APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET=xxx
APPSMITH_SIGNUP_ALLOWED_DOMAINS=xxx #same as our domain (without port)

After this set up we can sign in with Google (“continue with Google”). The consent screen looks good. But after we click on our Google user account, we are redirected to xxx;org/login/oauth2/code/google (without port). That page does not exist. We think it needs to redirect to xxx;org:30000/login/oauth2/code/google. How do we accomplish this correct redirect?

I tried manipulating the URL of the consent screen to set redirect_uri=http%3A%2F%2Fxxx;org%2Flogin%2Foauth2%2Fcode%2Fgoogle to redirect_uri=http%3A%2F%2Fxxx;org%3A30000%2Flogin%2Foauth2%2Fcode%2Fgoogle. The redirect works, but it gets me to xxx;org:30000/applications/user/login?error=true (with an Appsmith page saying “Either this page doesn’t exist, or you don’t have access to this page”). So the solution might not be that easy…

Many thanks for any help with this.

(edit: needed to replace .org to ;org because I can’t put too many URL’s in here as a new one)

This issue is reported on Github, see here.