Notify President Madagascar
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    zombie-passport-twitterpublic

    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)
    })

    Tests

    Create a file ./test/config.json:

    {
      "username": "YOUR_USERNAME",
      "password": "YOUR_PASSWORD",
      "consumerKey": "YOUR_CONSUMER_KEY",
      "consumerSecret": "YOUR_CONSUMER_SECRET"
    }

    Then run:

    $ grunt test

    Keywords

    none

    install

    npm i zombie-passport-twitter

    Downloadslast 7 days

    3

    version

    0.0.3

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar