Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 84a48ad

Browse files
committedNov 8, 2018
Clean up
1 parent e5007cc commit 84a48ad

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed
 

‎authentication.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ const config = {
1515
oauth_consumer_secret: '{{process.env.CLIENT_SECRET}}',
1616
oauth_signature_method: 'HMAC-SHA1',
1717
oauth_callback: '{{bundle.inputData.redirect_uri}}',
18-
oauth_version: '1.0'
18+
oauth_version: '1.0' // must be 1.0 for Twitter
1919
}
2020
},
2121
authorizeUrl: {
2222
url: AUTHORIZE_URL,
2323
params: {
24-
oauth_token: '{{bundle.inputData.oauth_token}}',
25-
name: 'Zapier/Twitter OAuth1 Test'
24+
oauth_token: '{{bundle.inputData.oauth_token}}'
2625
}
2726
},
2827
getAccessToken: {
@@ -43,9 +42,8 @@ const config = {
4342
connectionLabel: '{{screen_name}}'
4443
};
4544

46-
// To include the Authorization header on all outbound requests, simply define a
47-
// function here. It runs runs before each request is sent out, allowing you to make
48-
// tweaks to the request in a centralized spot.
45+
// A middleware that is run before z.request() actually makes the request. Here we're
46+
// adding necessary OAuth1 parameters to `auth` property of the request object.
4947
const includeAccessToken = (req, z, bundle) => {
5048
if (
5149
bundle.authData &&

0 commit comments

Comments
 (0)
This repository has been archived.