NangoHQ / nango

A single API for all your integrations.
https://www.nango.dev
Other
4.33k stars 382 forks source link

fix(connection): refresh credentials should re-fetch connection before proceeding #2387

Closed bodinsamuel closed 1 week ago

bodinsamuel commented 1 week ago

Describe your changes

Should fix https://linear.app/nango/issue/NAN-1164/credal-box-connection-failing-to-refresh-intermittently

linear[bot] commented 1 week ago

NAN-1164 Credal Box connection failing to refresh intermittently

bodinsamuel commented 1 week ago

This fix looks a bit messy and recursive

what else would you envision? the refresh_token is most likely outdated so I don't see any other way (except returning directly the new credentials)

khaliqgant commented 1 week ago

This fix looks a bit messy and recursive

what else would you envision? the refresh_token is most likely outdated so I don't see any other way (except returning directly the new credentials)

Didn't have anything in mind w/o looking deeper at it, so am OK with this