restberry-passport-twitter

1.1.0 • Public • Published

Restberry-Passport-Twitter

Restberry Passport wrapper for passport-twitter.

Install

npm install restberry-passport-twitter

Usage

var restberryPassport = require('restberry-passport');

var auth = restberryPassport.config(function(auth) {
    ...
})
.use('twitter', {
    consumerKey: ...,
    consumerSecret: ...,
    callbackHost: ...,
    returnURL: ...,
});

restberry.use(auth);

Two new routes have been created to the User:

  • GET /login/twitter
  • GET /login/twitter/callback

Known issues

You can't retrieve the email address from the Twitter API so right now it can't be matched with an already existing account. Since the email is a required field the email is set to the twitter username + '@restberry.com'.

Run the tests

The tests require you to have the node test app running on port 6000 and the the index.html test file accessable at port 6001 on your localhost. There is an nginx-conf file that is setup for this in the test directory. Then simply run:

npm test

Package Sidebar

Install

npm i restberry-passport-twitter

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • materik