New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

everyauth

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

everyauth - npm Package Compare versions

Comparing version 0.2.26 to 0.2.27

issues/open/GH-113/index.js

6

example/conf.js

@@ -34,3 +34,3 @@ module.exports = {

}
, '37signals': {
, _37signals: {
clientId: 'cd4bf9cd9ed828b6bed8b67e6b314cf8b90c8de5'

@@ -70,2 +70,6 @@ , clientSecret: '07883c36b4f4493b70f31872ed8fbdb099ff1cef'

}
, dwolla: {
clientId: 'Enter your consumer key here'
, clientSecret: 'Enter your consumer secret here'
}
};

@@ -42,2 +42,3 @@ var express = require('express')

var usersByOpenId = {};
var usersByDwollaId = {};
var usersByLogin = {

@@ -263,4 +264,4 @@ 'brian@example.com': addUser({ login: 'brian@example.com', password: 'password'})

everyauth['37signals']
.appId(conf['37signals'].clientId)
.appSecret(conf['37signals'].clientSecret)
.appId(conf['_37signals'].clientId)
.appSecret(conf['_37signals'].clientSecret)
.findOrCreateUser( function (sess, accessToken, accessSecret, _37signalsUser) {

@@ -289,2 +290,11 @@ return usersBy37signalsId[_37signalsUser.id] ||

everyauth.dwolla
.appId(conf.dwolla.clientId)
.appSecret(conf.dwolla.clientSecret)
.scope('accountinfofull')
.findOrCreateUser( function (sess, accessToken, accessTokenExtra, dwollaUser) {
return usersByDwollaId[dwollaUser.id] || (usersByDwollaId[dwollaUser.id] = addUser('dwolla', dwollaUser));
})
.redirectPath('/');
var app = express.createServer(

@@ -291,0 +301,0 @@ express.bodyParser()

16

lib/modules/oauth2.js

@@ -146,3 +146,4 @@ var everyModule = require('./everymodule')

, url = this.oauthHost() + this.accessTokenPath()
, additionalParams = this.moreAccessTokenParams;
, additionalParams = this.moreAccessTokenParams
, param;

@@ -157,3 +158,11 @@ if (this.accessTokenPath().indexOf("://") != -1) {

if (additionalParams) for (var k in additionalParams) {
params[k] = additionalParams[k];
param = additionalParams[k];
if ('function' === typeof param) {
additionalParams[k] = // cache the fn call
param = param.call(this);
}
if ('function' === typeof param) {
param = param.call(this, req, res);
}
params[k] = param;
}

@@ -168,3 +177,2 @@

}
delete opts.query.redirect_uri
rest[this.accessTokenHttpMethod()](url, opts)

@@ -265,4 +273,2 @@ .on('success', function (data, res) {

}
if ('function' === typeof val)
val = val();
if (val)

@@ -269,0 +275,0 @@ this.moreAccessTokenParams[key] = val;

{
"name": "everyauth",
"description": "Auth solution (password, facebook, & more) for your node.js Connect & Express apps",
"version": "0.2.26",
"version": "0.2.27",
"homepage": "https://github.com/bnoguchi/everyauth/",

@@ -30,2 +30,3 @@ "repository": {

"restler": ">=0.2.1",
"request": ">=2.2.0",
"connect": ">=1 <2",

@@ -32,0 +33,0 @@ "openid": ">=0.2.0",

@@ -10,25 +10,40 @@ everyauth

- `password`
- `OpenId` &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Credits [RocketLabs Development](https://github.com/rocketlabsdev), [Andrew Mee](https://github.com/starfishmod), [Brian Noguchi](https://github.com/bnoguchi))
- `Google Hybrid` &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Credits [RocketLabs Development](https://github.com/rocketlabsdev))
- OAuth
- `twitter`
- `linkedin`
- `yahoo`
- `readability` &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Credits [Alfred Nerstu](https://github.com/alfrednerstu))
- `dropbox` &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Credits [Torgeir](https://github.com/torgeir))
- `justin.tv` &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Credits [slickplaid](https://github.com/slickplaid))
- `vimeo` &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Credits [slickplaid](https://github.com/slickplaid))
- `tumblr`
- OAuth2
- `facebook`
- `github`
- `instagram`
- `foursquare`
- `google`
- `gowalla` &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Credits [Andrew Kramolisch](https://github.com/andykram))
- `37signals` (Basecamp, Highrise, Backpack, Campfire)
- `angellist`
- `box` (Box.net)
- `LDAP` (experimental; not production-tested)
<table style="text-align:left">
<thead>
<tr>
<th> Authenticate Via <th> Credits
</tr>
</thead>
<tbody id=openid>
<tr> <td> Password <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/openid.ico" style="vertical-align:middle"> OpenId <td> <a href="https://github.com/rocketlabsdev">RocketLabs Development</a>, <a href="https://github.com/starfishmod">Andrew Mee, <a href="https://github.com/bnoguchi">Brian Noguchi</a>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/google.ico" style="vertical-align:middle"> Google Hybrid <td> <a href="https://github.com/rocketlabsdev">RocketLabs Development</a>
</tbody>
<tbody id=oauth>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/twitter.ico" style="vertical-align:middle"> Twitter <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/linkedin.ico" style="vertical-align:middle"> LinkedIn <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/yahoo.ico" style="vertical-align:middle"> Yahoo! <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/readability.ico" style="vertical-align:middle"> Readability <td> <a href="https://github.com/alfrednerstu">Alfred Nerstu</a>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/dropbox.ico" style="vertical-align:middle"> Dropbox <td> <a href="https://github.com/torgeir">Torgeir</a>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/justintv.ico" style="vertical-align:middle"> Justin.tv <td> <a href="https://github.com/slickplaid">slickplaid</a>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/vimeo.gif" style="vertical-align:middle"> Vimeo <td> <a href="https://github.com/slickplaid">slickplaid</a>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/tumblr.jpg" style="vertical-align:middle"> Tumblr <td>
</tbody>
<tbody id=oauth2>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/facebook.ico" style="vertical-align:middle"> Facebook <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/github.ico" style="vertical-align:middle"> Github <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/instagram.ico" style="vertical-align:middle"> Instagram <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/foursquare.ico" style="vertical-align:middle"> Foursquare <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/google.ico" style="vertical-align:middle"> Google <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/gowalla.ico" style="vertical-align:middle"> Gowalla <td> <a href="https://github.com/andykram">Andrew Kramolisch</a>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/37signals.ico" style="vertical-align:middle"> 37signals
(Basecamp, Highrise, Backpack, Campfire) <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/angellist.ico" style="vertical-align:middle"> AngelList <td>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/dwolla.ico" style="vertical-align:middle"> Dwolla <td> <a href="https://github.com/nanek">Kenan Shifflett</a>
</tbody>
<tbody id=misc>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/box.ico" style="vertical-align:middle"> Box.net <td>
<tr> <td> LDAP (experimental; not production-tested) <td>
</tbody>
</table>

@@ -1031,2 +1046,34 @@ `everyauth` is:

## Setting up Dwolla OAuth2
First, register an app [on Dwolla](http://www.dwolla.com/developers).
```javascript
var everyauth = require('everyauth')
, connect = require('connect');
everyauth.dwolla
.appId('YOUR CLIENT ID HERE')
.appSecret('YOUR TOKEN HERE')
.scope('accountinfofull')
.findOrCreateUser( function (session, accessToken, accessTokenExtra, dwollaUserMetadata) {
// find or create user logic goes here
// Return a user or Promise that promises a user
// Promises are created via
// var promise = this.Promise();
})
.redirectPath('/');
var routes = function (app) {
// Define your routes here
};
connect(
connect.bodyParser()
, connect.cookieParser()
, connect.session({secret: 'whodunnit'})
, everyauth.middleware()
, connect.router(routes);
).listen(3000);
## Setting up Yahoo OAuth

@@ -1895,2 +1942,4 @@

- Gowalla
- [Kenan Shifflett](https://github.com/nanek)
- Dwolla

@@ -1897,0 +1946,0 @@ ### MIT License

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc