We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0fa9e4 commit c1baf77Copy full SHA for c1baf77
integrationos-oauth/src/connections/salesforce/refresh.ts
@@ -31,6 +31,11 @@ export const refresh = async ({ body }: DataObject): Promise<OAuthResponse> => {
31
data: { access_token: accessToken, token_type: tokenType },
32
} = response;
33
34
+ let refreshToken = refresh_token;
35
+ if (response.data.refresh_token) {
36
+ refreshToken = response.data.refresh_token;
37
+ }
38
+
39
// Get expiry time through introspection
40
const introspection = await axios({
41
url: `${baseUrl}/introspect`,
@@ -51,7 +56,7 @@ export const refresh = async ({ body }: DataObject): Promise<OAuthResponse> => {
51
56
52
57
return {
53
58
accessToken,
54
- refreshToken: refresh_token,
59
+ refreshToken,
55
60
expiresIn,
61
tokenType,
62
meta: {
0 commit comments