sahat / hackathon-starter

A boilerplate for Node.js web applications
MIT License
34.88k stars 8.18k forks source link

Twitter auth - 500 Server Error #1142

Closed anandlall112 closed 2 years ago

anandlall112 commented 3 years ago

Any idea why this is happening? i have added the required consumer keys and appropriate permissions on twitter dev

Error: Application cannot perform write actions. Contact Twitter Platform Operations through https://help.twitter.com/forms/platform.

at Strategy.parseErrorResponse (C:\auth-app\node_modules\passport-twitter\lib\strategy.js:206:12)
at Strategy.OAuthStrategy._createOAuthError (C:\auth-app\node_modules\passport-oauth1\lib\strategy.js:393:16)
at C:\auth-app\node_modules\passport-oauth1\lib\strategy.js:244:41
at C:\auth-app\node_modules\oauth\lib\oauth.js:543:17
at passBackControl (C:\auth-app\node_modules\oauth\lib\oauth.js:397:13)
at IncomingMessage.<anonymous> (C:\auth-app\node_modules\oauth\lib\oauth.js:409:9)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

GET /auth/twitter 500 149.690 ms - 12

anandlall112 commented 3 years ago

Found the issue. it was related to me creating my own .env file, which i didn't realize the path was set as dotenv.config({ path: '.env.example' });