https://github.com/simov/passport-stocktwits
Stocktwits authentication strategy for Passport and Node.js
https://github.com/simov/passport-stocktwits
Last synced: about 1 year ago
JSON representation
Stocktwits authentication strategy for Passport and Node.js
- Host: GitHub
- URL: https://github.com/simov/passport-stocktwits
- Owner: simov
- License: mit
- Created: 2013-12-02T10:02:05.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-12-02T10:15:31.000Z (over 12 years ago)
- Last Synced: 2025-04-23T11:42:30.056Z (over 1 year ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#passport-stocktwits
```bash
$ npm install passport-stocktwits
```
```js
var passport = require('passport'),
StockTwitsStrategy = require('passport-stocktwits').Strategy;
passport.use(new StockTwitsStrategy({
clientID: '___',
clientSecret: '___',
callbackURL: 'http://localhost:3000/connect/stocktwits/callback',
passReqToCallback: true
}, function (req, token, secret, profile, done) {
console.log(token);
console.log(profile);
done();
}
));
app.get('/connect/stocktwits', passport.authorize('stocktwits',
{scope: ['read','watch_lists','publish_messages','publish_watch_lists',
'follow_users','follow_stocks'], failureRedirect:'/', successRedirect:'/'}));
app.get('/connect/stocktwits/callback', passport.authorize('stocktwits',
{failureRedirect:'/', successRedirect:'/'}));
```