Skip to content

Commit

Permalink
fix(platforms): adds scope to twitter auth flow
Browse files Browse the repository at this point in the history
  • Loading branch information
aminah-io committed Aug 22, 2023
1 parent 2c09c27 commit 31c8e3e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platforms/src/Twitter/procedures/twitterOauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export const initClientAndGetAuthUrl = (callbackOverride?: string): string => {
clientSecret: process.env.TWITTER_CLIENT_SECRET,
}).readOnly;

const { url, codeVerifier, state } = client.generateOAuth2AuthLink(callback);
const { url, codeVerifier, state } = client.generateOAuth2AuthLink(callback, {
scope: ["tweet.read", "users.read"],
});

// This is necessary because of how we use the state to
// direct the oauth window to the correct message channel
Expand Down

0 comments on commit 31c8e3e

Please sign in to comment.