I am trying to integrate with API service provider to retrieve bank balances from multiple banks. However, they are not using the standard OAuth2. This is a summary of the steps involved:
API Request with client id and secret to get an access token
Another API request to use the access token from #1, client ID, a Redirect URI. I will receive a link (URL) upon successfully authentication.
Launch this link in a browser (the service provider suggests to use an iframe) received from #2. In the browser, I have to login and authenticate against the bank I want to extract the bank balances. It will generate "code" in the url parameters and send back to the redirect URI upon successful authentication.
Another API call with this "code" from #3, with client_id and secret to get the access and refresh token for rest of the process.
I use custom authentication, and am able to complete step 1 - 3. But I am unable to find a way to capture the redirect URI and expose the url parameter (specifically I just need the "code").
Any help on how this can be done in Retool will be highly appreciated.
Hey @yikl - thanks for reaching out. Based on what you've described, I think the application at your redirect_uri would have to be responsible for capturing the code URL parameter. Is that a Retool app or something else?
In general, referencing url.searchParams from within your app will allow you to retrieve any search parameters, but I'm not sure how you would be able to chain this additional step onto the end of your existing custom auth flow.