Salesforce OAuth flow has some uncommon handling of access token expiration, which makes it currently incompatible with Nango:
Instead of providing an expires_at entry for the expiration time in the token response, it just returns an access token and a refresh token.
To understand if the access token is expired you have two options:
Listen for a 401 response from the API
Query a specific endpoint that returns the expiration data of the access token.
Note that the expiration time of the access token can be set by the customer (along with an option to manually revoke it at any time).
Salesforce OAuth flow has some uncommon handling of access token expiration, which makes it currently incompatible with Nango: Instead of providing an
expires_at
entry for the expiration time in the token response, it just returns an access token and a refresh token. To understand if the access token is expired you have two options:Note that the expiration time of the access token can be set by the customer (along with an option to manually revoke it at any time).
These two methods are documented in more detail here: https://dev.to/xkit/when-do-salesforce-access-tokens-expire-1ih9#:~:text=Typical%20Token%20Expiration,any%20time%20with%20no%20warning.
Raw token response from Salesforce:
Template for providers.yaml (to be inserted above salesloft):
DM me for credentials to test this with our Salesforce developer account.