Auto-Refresh OAuth2 Dynamic

i’m working on a project that requires OAuth2 and we are trying to figure out how to make the auto-refresh token work.

When the user authorize integration, the oauth2 authentication code is sent to the Callback URL.

if we set the callback to us, we can get the Authorization Code and start the pipeline passing it to an account via metadata, but we aren’t able to auto refresh with SL, because the callback is set to us.

if we set the callback do SL, the auto refresh works perfectly, but we need the app users to access the authentication page and authorize integration with our Partner, so it will generate the authentication code we need to start the integration.