Problem with retrieving OAuth authentication code from a URL

Hi everyone,

I’m currently working on a project with Qodly and have implemented OAuth authentication with Google Drive. Here’s the issue I’m facing:

When a user is redirected to the Google Drive authentication page, the URL includes a redirect_uri parameter that correctly points back to my application. After the user grants permission, Google redirects them to my application with a code parameter in the URL (e.g., https://myapplication.com/callback?code=XXXXXXX).

The problem is that I can’t seem to retrieve this code parameter once the user is back on my page. I’m unsure whether the issue lies in my app configuration, the way the URL is handled in Qodly, or if I’m missing something in the redirection handling process.

Here’s what I’ve checked so far:

  1. My redirect_uri is properly registered in Google Cloud Console and matches the URL of my app exactly.
  2. The redirection works fine, as the user is correctly redirected to my page after granting permission.
  3. I tried accessing window.location.href in QodlyScript to read the URL, but I’m not sure if this is the correct way to extract the code parameter.

Can someone guide me on how to retrieve this parameter in Qodly? Is there a specific method to handle URL parameters in this context?

Thanks in advance for your help! :pray:

Hello Romain,

Great news! With Qodly 1.0.0, you can use the onHttpGet feature to retrieve the authorization code from the callback during the OAuth2 process.

We understand the importance of having clear guidance, so we’re actively working on a detailed article to demonstrate how to implement this step-by-step. We’ll keep you updated once it’s published.

In the meantime, if you have any specific questions, feel free to reach out. we’re here to help!

Hello Ayoub,
Thank you for your help and responsiveness.

Hi Romain,

Additionally, Qodly 1.1 will be released in a few weeks and provides a full set of features to handle such incoming http requests.

Mathieu

Hi Mathieu,
This is great news about Qodly 1.1. I’ll keep an eye on the release and look forward to exploring its new features.

@ayoub i don’t think this is implemented for anything other than dataclass calls.
i have a request that is over a year old that has to do with using redirect uri’s.
@Romain if you get this working i’d like to see how. maybe it’s just quicken’s response that breaks qodly.

Hello Mickey,
I haven’t been able to get it working with the onHttpGet feature for now, but I’ll keep exploring this path while waiting for version 1.1. …

Following various tests, I was unable to use onHttpGet to retrieve the code from the URL and generate the token. However, I was able to achieve this by creating a custom component that allows me to perform both operations.