This module is designed to be the lightest possible wrapper on Twitter OAuth.
All this in < 100 lines of code.
npm install login-with-twitter
Set up two routes on your web sever. We'll call them /twitter
and
/twitter/callback
but they can be named anything.
Initialize this module:
const LoginWithTwitter = require('login-with-twitter')
const tw = LoginWithTwitter({
consumerKey: '<your consumer key>',
consumerSecret: '<your consumer secret>',
callbackUrl: 'https://example.com/twitter/callback'
})
MIT. Copyright (c) Feross Aboukhadijeh.