zombie-passport-twitter
v0.0.3
Published
Headless "Sign In with Twitter"
Downloads
2
Readme
Installation
$ npm install zombie-passport-twitter
Usage
var zpt = require('zombie-passport-twitter')
zpt.signIn({
url: '/auth/twitter',
username: YOUR_USERNAME,
password: YOUR_PASSWORD,
wait: 5e3
}, function(err, browser){
// you're signed in!
})
You can use the session to sign additional requests, using supertest
for example:
zpt.signIn(YOUR_OPTIONS, function(err, browser){
supertest(YOUR_SERVER)
.get('/')
.set('cookie', browser.cookies[0].toString())
.expect(200)
})