Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forcing of approval prompt, not user friendly. #324

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
cb811cd
Added facebook canvas steps
bigokro Apr 21, 2012
b1c9dd4
Added tarball for use with npm
bigokro Apr 21, 2012
c8926df
Tarball wasn't zipped
bigokro Apr 21, 2012
498c57c
Added Fecebook canvas support via new step sequences
bigokro Apr 21, 2012
9d4d2d3
Updated tarball with latest version
bigokro Apr 21, 2012
4aa9a6b
Minor cleanup work
bigokro Apr 21, 2012
3f43659
Moved Facebook Canvas into separate submodule. Did all TODOs.
bigokro Apr 28, 2012
d943210
Updated tarball
bigokro Apr 28, 2012
7bc2895
Minor update to README
bigokro Apr 29, 2012
491f836
fix for issue #244 where the tumblr module is returning an undefined …
philippkueng May 11, 2012
c9098d5
Added Meetup OAuth2 support
jonathana May 17, 2012
3a6dfe5
Meetup OAuth2 support added. Docs update.
jonathana May 17, 2012
61e9558
corrected a typo in readme code sample
May 19, 2012
0d241f2
cleaned up a variable name that did not get fixed when copying over t…
jonathana May 23, 2012
0b504c9
added smarterer oauth
kaizenpack May 24, 2012
25d4ae4
Add support for RunKeeper HealthGraph API
akinsella May 26, 2012
950559d
Runkeeper documentation Update
akinsella May 26, 2012
5375cf4
Fix for 'this.redirect is missing' in openid
cortfr May 31, 2012
bd56ab3
Added yahoohybrid
cortfr May 31, 2012
be51e02
password was not being deleted.
ebaizel Jun 6, 2012
40ef8aa
Changed example scope for Google OAuth2 to one that works.
jacksonp Jun 10, 2012
545751c
Merge pull request #280 from jacksonp/master
bnoguchi Jun 11, 2012
fd7d567
Merge pull request #275 from ebaizel/patch-2
bnoguchi Jun 11, 2012
1b986b6
Merge branch 'master' of https://github.com/bnoguchi/everyauth
kaizenpack Jun 12, 2012
9794626
added smarterer to README
kaizenpack Jun 13, 2012
ae046f3
added full detail section
kaizenpack Jun 13, 2012
f792d7a
fixed indentation issue
kaizenpack Jun 13, 2012
be7c423
Now using Github api v3
hostalerye Jun 13, 2012
784547f
Merge pull request #281 from kaizenpack/master
bnoguchi Jun 13, 2012
9f2c438
Merge pull request #282 from hostalerye/master
bnoguchi Jun 13, 2012
31063ba
Added proper AttributeExchange name for yahoohybrid
cortfr Jun 13, 2012
8aa92a4
[fix] Changed require('sys') to require('util') for compatibility wit…
blakmatrix Jun 23, 2012
46ca603
gracefully detect and handle when user declines authorization
sstrigler Jun 25, 2012
fafc486
added dailycred
hstove Jul 9, 2012
66fc876
ready for push
hstove Jul 14, 2012
7ce6393
added dailycred to providers, finished touches
hstove Jul 14, 2012
dee15f4
Merge pull request #302 from hstove/master
bnoguchi Jul 14, 2012
20d643b
added sina weibo to providers
justan Jul 23, 2012
a8f4961
Spotted bug in the example code; saving a vimeo user
LuukvE Jul 28, 2012
e545e24
fixed broken links
hstove Aug 3, 2012
dc4a591
Merge pull request #316 from hstove/master
bnoguchi Aug 8, 2012
c5ee5fe
Merge pull request #314 from LuukvE/master
bnoguchi Aug 8, 2012
8c11710
Merge pull request #311 from justan/master
bnoguchi Aug 8, 2012
c9c8da4
Merge branch 'master' of https://github.com/akinsella/everyauth into …
bnoguchi Aug 8, 2012
c6471ba
0.2.33
bnoguchi Aug 8, 2012
5b20c19
Merge pull request #288 from node-migrator-bot/clean
bnoguchi Aug 8, 2012
772e7c0
Merge pull request #264 from gkrcode/master
bnoguchi Aug 8, 2012
31fa26e
Merge branch 'meetup_oauth2' of https://github.com/jonathana/everyaut…
bnoguchi Aug 8, 2012
d560187
Merge branch 'master' of github.com:bnoguchi/everyauth
bnoguchi Aug 8, 2012
bf495f7
Merge pull request #272 from cortfr/yahoohybrid
bnoguchi Aug 8, 2012
1409241
Merge pull request #261 from philippkueng/patch-1
bnoguchi Aug 8, 2012
89d4e83
Merge pull request #247 from bigokro/master
bnoguchi Aug 8, 2012
61ccea8
Rm tarball
bnoguchi Aug 8, 2012
e06116f
Merge pull request #290 from sstrigler/master
bnoguchi Aug 8, 2012
e04500d
Add instructions for installing the express3 version of everyauth. (C…
bnoguchi Aug 8, 2012
f481674
Merge branch 'master' of github.com:bnoguchi/everyauth
bnoguchi Aug 8, 2012
a667fd8
Remove duplicate Mendeley item in README
bnoguchi Aug 8, 2012
d9d9a80
0.2.34
bnoguchi Aug 8, 2012
8e07871
0.3.0
bnoguchi Aug 8, 2012
bc35383
Forcing of approval prompt, not user friendly.
sharonjl Aug 12, 2012
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ issues
IRC.md
playground.js
CHANGES
npm-debug.log
.idea
118 changes: 115 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,22 @@ So far, `everyauth` enables you to login via:
<td> <a href="https://github.com/ufssf">ufssf</a>
<tr> <td> <img src="http://static.mailchimp.com/www/downloads/brand-assets/Freddie_Light_Background.png" style="vertical-align:middle" width="16px"> Mailchimp
<td> <a href="http://github.com/wnadeau">Winfred Nadeau</a>
<tr> <td> <img src="http://github.com/bnoguchi/everyauth/raw/master/media/meetup.ico" style="vertical-align:middle"> Meetup
<td> <a href="http://github.com/jonathana">Jonathan Altman</a>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/mendeley.ico" style="vertical-align:middle"> Mendeley
<td> <a href="https://github.com/edy-b">Eduard Baun</a>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/smarterer.ico" style="vertical-align:middle"> Smarterer
<td> <a href="https://github.com/kaizenpack">kaizenpack</a>
<tr> <td> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/runkeeper.ico" style="vertical-align:middle"> RunKeeper
<td> <a href="https://github.com/akinsella">Alexis Kinsella</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> <img src="https://github.com/bnoguchi/everyauth/raw/master/media/openid.ico" style="vertical-align:middle" width="16px" height="16px"> 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> LDAP (experimental; not production-tested) <td>
<tr> <td> Windows Azure Access Control Service (ACS)<td> <a href="https://github.com/darrenzully">Dario Renzulli</a>, <a href="https://github.com/jpgarcia">Juan Pablo Garcia</a>, <a href="https://github.com/woloski">Matias Woloski</a> from <a href="http://blogs.southworks.net/">Southworks</a>
<tr><td><img src='https://www.dailycred.com/public/img/favicon.ico' style="vertical-align:middle">Dailycred <td> <a href='https://github.com/hstove'>Hank Stoever</a> at <a href='https://dailycred.com'>Dailycred.com</a>
<tr><td><img src='http://www.sinaimg.cn/blog/developer/wiki/LOGO_16x16.png' style="vertical-align:middle">Sina Weibo<td> <a href='https://github.com/justan'>justan</a>
</tbody>
</table>

Expand All @@ -76,8 +84,15 @@ So far, `everyauth` enables you to login via:


## Installation

If you are using Connect 1.x or Express 2.x, install via:

$ npm install everyauth

If you are using Express 3.x, install via:

$ npm install git://github.com/bnoguchi/everyauth.git#express3

## Quick Start
Using everyauth comes down to just 2 simple steps if using Connect
or 3 simple steps if using Express:
Expand Down Expand Up @@ -445,6 +460,28 @@ everyauth.facebook
// rest of configuration
```

### Facebook Canvas Pages
For apps that can be embedded in Facebook via the canvas page, you can use the
facebookCanvas submodule:

```javascript
everyauth.facebookCanvas
.canvasPath('CANVAS URL MINUS HOSTNAME') // Default is '/auth/facebook/canvas'
.canvasPage('CANVAS PAGE'); // Generally http://apps.facebook.com/APP-NAME
```

Note that you must also configure the usual Facebook configurations described
above in order for this to work.

You can tell if the user logged in via the canvas interface using the following test:

```javascript
if (everyauth.facebookCanvas) {
// Do something different
}
```


## Twitter OAuth

```javascript
Expand Down Expand Up @@ -794,7 +831,7 @@ everyauth.password
var promise = this.Promise()
, password = newUserAttrs.password;

delete newUserAttrs[password]; // Don't store password
delete newUserAttrs.password; // Don't store password
newUserAttrs.salt = bcrypt.genSaltSync(10);
newUserAttrs.hash = bcrypt.hashSync(password, salt);

Expand Down Expand Up @@ -1065,10 +1102,10 @@ var everyauth = require('everyauth')
everyauth.google
.appId('YOUR CLIENT ID HERE')
.appSecret('YOUR CLIENT SECRET HERE')
.scope('https://www.google.com/m8/feeds') // What you want access to
.scope('https://www.googleapis.com/auth/userinfo.profile') // What you want access to
.handleAuthCallbackError( function (req, res) {
// If a user denies your app, Google will redirect the user to
// /auth/facebook/callback?error=access_denied
// /auth/google/callback?error=access_denied
// This configurable route handler defines how you want to respond to
// that.
// If you do not configure this, everyauth renders a default fallback
Expand Down Expand Up @@ -2112,6 +2149,35 @@ connect(
).listen(3000);
```

### RunKeeper OAuth (2.0)

You will first need to [register your application](http://runkeeper.com/partner/applications) to get the appId and appSecret.

```javascript
everyauth.runkeeper
.appId('YOUR CONSUMER KEY HERE')
.consumerSecret('YOUR CONSUMER SECRET HERE')
.findOrCreateUser( function (sess, accessToken, accessSecret, user) {
// find or create user logic goes here
//
// e.g.,
// return usersByRunKeeperId[user.userID] || (usersByRunKeeperId[user.userID] = user);
})
.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);
```

### OpenID protocol

OpenID protocol allows you to use an openid auth request. You can read more information about it here http://openid.net/
Expand Down Expand Up @@ -2195,6 +2261,40 @@ connect(
).listen(3000);
```

### Smarterer

You will need to register for an app id [here](http://www.smarterer.com/). Implementation details follow the same pattern as with other
oauth2 implementations.

```javascript

var everyauth = require('everyauth')
, connect = require('connect');

everyauth.smarterer
.appId('YOUR APP ID')
.appSecret('YOUR APP SECRET')
.findOrCreateUser(function(session, accessToken, accessTokenSecret, userData) {
// find or create user logic goes here
// userData.userName will contain the smarterer username for the authenticated user
// userData.badges will contain the scores on quizes
})
.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);
```


### Box.net

```javascript
Expand Down Expand Up @@ -2341,6 +2441,18 @@ object whose parameter name keys map to description values:
everyauth.box.configurable();
```

### Dailycred OAuth

```javascript
everyauth.dailycred
.appId(conf.dc.appId)
.findOrCreateUser( function (session, accessToken, accessTokenExtra, dcUserMetadata) {
return usersByDcId[dcUserMetadata.id] ||
(usersByDcId[dcUserMetadata.id] = addUser('dailycred', dcUserMetadata));
})
.redirectPath('/');
```

## Configuring a Module

everyauth was built with powerful configuration needs in mind.
Expand Down
17 changes: 16 additions & 1 deletion example/conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
module.exports = {
fb: {
dc: {
appId: '7ab1a53d-9d0e-4eeb-af62-76a5e1a83af9',
appSecret: '88bee747-c1ef-4851-be60-84d53dd474ad-88495db2-5db0-47c8-ad77-9e92db7e308c',
}
, fb: {
appId: '111565172259433'
, appSecret: '85f7e0a0cc804886180b887c1f04a3c1'
}
Expand Down Expand Up @@ -116,4 +120,15 @@ module.exports = {
consumerKey: 'Enter your consumer key here'
, consumerSecret: 'Enter your consumer secret here'
}
, weibo: {
appId: '3350967939'
, appSecret: 'ef7f0a836d0ef315dca53e8d73816cc0'
}
, runkeeper: {
appId: 'Enter your client/app id here'
, appSecret: 'Enter your client/app secret here'
, meetup: {
appId: 'nurgg46uqquq3eqa957ivnddv9'
, appSecret: '6spfeab72gc8f89l735i391rr3'
}
};
Loading