Skip to content

Commit 1d5e4ff

Browse files
committed
fix(pinterest): add OAuth token refresh handler
Added Pinterest provider to getProviderAuthConfig() to enable automatic token refresh when access tokens expire. Without this, users would experience authentication failures after tokens expire. Configuration: - Token endpoint: https://api.pinterest.com/v5/oauth/token - Uses Basic Authentication (as per Pinterest OAuth spec) - Supports refresh token rotation This prevents authentication failures and ensures continuous Pinterest integration functionality.
1 parent 6e97e98 commit 1d5e4ff

File tree

2 files changed

+400
-301
lines changed

2 files changed

+400
-301
lines changed

apps/sim/lib/oauth/oauth.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,19 @@ function getProviderAuthConfig(provider: string): ProviderAuthConfig {
10811081
supportsRefreshTokenRotation: false,
10821082
}
10831083
}
1084+
case 'pinterest': {
1085+
const { clientId, clientSecret } = getCredentials(
1086+
env.PINTEREST_CLIENT_ID,
1087+
env.PINTEREST_CLIENT_SECRET
1088+
)
1089+
return {
1090+
tokenEndpoint: 'https://api.pinterest.com/v5/oauth/token',
1091+
clientId,
1092+
clientSecret,
1093+
useBasicAuth: true,
1094+
supportsRefreshTokenRotation: true,
1095+
}
1096+
}
10841097
default:
10851098
throw new Error(`Unsupported provider: ${provider}`)
10861099
}

0 commit comments

Comments
 (0)