Category: Installation
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Google OAuth redirect_uri with port

Issue

I set up Google authentication on our Appsmith server, but when I try to sign in with my Google account, I am redirected to a non-existent page. It seems like the redirect needs to include the server port (30000), but I'm not sure how to accomplish this. I tried manually changing the redirect URI, but it resulted in an error page.

Resolution

The issue is that after setting up Google Authentication for Appsmith, the redirect URI is incorrect and leads to a non-existent page. The user tried manipulating the URL of the consent screen, but it didn't work.

The solution is to update the Appsmith Docker environment variable "APPSMITH_SERVER_URL" to include the port number (e.g. "https://xxx.org:30000") and update the "APPSMITH_OAUTH2_GOOGLE_REDIRECT_URI" to include the same port number (e.g. "https://xxx.org:30000/login/oauth2/code/google").

This can be done by adding the following lines to the docker.env file:

APPSMITH_SERVER_URL=https://xxx.org:30000
APPSMITH_OAUTH2_GOOGLE_REDIRECT_URI=https://xxx.org:30000/login/oauth2/code/google

Once these changes are made and the Docker container is restarted, the redirect should work correctly and users should be able to log in with Google Authentication.