Skip to content

Concorda/seneca-twitter-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seneca

A Seneca.js a seneca-auth plugin

seneca-twitter-auth

Dependency Status Gitter chat

This plugin is used by seneca-auth for authenticating via twitter login. It uses PassportJS. The seneca-auth is the authentication plugin used by Seneca toolkit.

For a gentle introduction to Seneca itself, see the senecajs.org site.

If you're using this plugin module, feel to contact on twitter if you have any questions! :) @rjrodger

  • Version: 0.1.1
  • License: MIT

About

seneca-twitter-auth's source can be read in an annotated fashion by,

  • running npm run annotate
  • viewing online.

The annotated source can be found locally at ./docs/twitter-auth.html.

If you're using this module, and need help, you can:

If you are new to Seneca in general, please take a look at senecajs.org. We have everything from tutorials to sample apps to help get you up and running quickly.

Install

npm install seneca-twitter-auth

Using Twitter Auth

When using seneca-auth the twitter auth must be initialized using:

..........
    service: {
      "local": {},
      "twitter" : {
        "apiKey" : "TWITTER_KEY",
        "apiSecret" : "TWITTER_SECRET",
        "urlhost" : "http://localhost:3000"
      }
    }
..........

Other information

There is provided a default seneca action that will prepare user data to a more convenient structure. If this data structure is not matching the expected user data structure used by your application, you can overwrite the seneca action and implement your own twitter-login-data action.

  • {role: 'auth', prepare: 'twitter_login_data'}

The JSON object provided for this action contains following data from Twitter login:

  • accessToken
  • tokenSecret
  • profile

Note: You can provide also the callbackUrl as part of the options. If not provided then a default value is used.

Default value for callbackUrl: '/auth/twitter/callback'

Register your app on twitter

Contributing

The Senecajs org encourage open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.

License

Copyright Nicolas Herment and other contributors 2016, Licensed under MIT.

About

twitter oauth plugin for seneca-auth

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •