Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

pass scopes as string

Kiran K50d906348f13
diff --git a/apps/web/lib/integrations/hubspot/oauth.ts b/apps/web/lib/integrations/hubspot/oauth.ts
index 06d729d1cd..559bb7147e 100644
--- a/apps/web/lib/integrations/hubspot/oauth.ts
+++ b/apps/web/lib/integrations/hubspot/oauth.ts
@@ -66,6 +66,6 @@ export const hubSpotOAuthProvider = new HubSpotOAuthProvider({
"crm.objects.contacts.write",
"crm.objects.deals.read",
"crm.schemas.contacts.write",
- ],
+ ].join(" "),
tokenSchema: hubSpotAuthTokenSchema,
});
diff --git a/apps/web/lib/integrations/oauth-provider.ts b/apps/web/lib/integrations/oauth-provider.ts
index 03dcaf0254..e9b1fa404e 100644
--- a/apps/web/lib/integrations/oauth-provider.ts
+++ b/apps/web/lib/integrations/oauth-provider.ts
@@ -10,7 +10,7 @@ export interface OAuthProviderConfig {
authUrl: string;
tokenUrl: string;
redirectUri: string;
- scopes: string[];
+ scopes: string;
redisStatePrefix: string;
tokenSchema: z.ZodSchema;
}
@@ -33,7 +33,7 @@ export class OAuthProvider<T extends z.ZodSchema> {
const searchParams = new URLSearchParams({
client_id: this.provider.clientId,
redirect_uri: this.provider.redirectUri,
- scope: this.provider.scopes.join(" "),
+ scope: this.provider.scopes,
response_type: "code",
state,
});