Category: Appsmith Support
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.

Hi, I amgetting this error while using google Auth API

Issue

I am experiencing an error in the deploy mode of my app while setting up custom Google login with Xano. While using it in edit mode it is working fine, but in the deploy mode, it's not taking the code parameter from the redirect URL. I have checked and added the URL to the authorized redirect URL on OAuth 2 credential, but the error continues to occur. The problem appeared suddenly without any changes being made to the setup.

Resolution

The issue here is that the code parameter is not being passed in the URL when redirecting in deploy mode, despite it being present in edit mode. The solution is to ensure that the deployed mode URL is added to the authorized redirect URL in the OAuth 2 credential set up for Xano login.

It is recommended to verify that the code parameter is present in the URL while redirecting and to specify the redirect_uri without the /edit. This can be done through checking the appsmith.URL.

If the issue persists despite adding the URL to the authorized redirect URL, it may be due to changes that were made. It is recommended to check the recent changes in the code and ensure that they are correct.