@@ -37,7 +37,7 @@ The OAuth 2.0 authentication strategy authenticates users using a third-party
37
37
account and OAuth 2.0 tokens. The provider's OAuth 2.0 endpoints, as well as
38
38
the client identifer and secret, are specified as options. The strategy
39
39
requires a ` verify ` callback, which receives an access token and profile,
40
- and calls ` done ` providing a user.
40
+ and calls ` cb ` providing a user.
41
41
42
42
``` js
43
43
passport .use (new OAuth2Strategy ({
@@ -47,9 +47,9 @@ passport.use(new OAuth2Strategy({
47
47
clientSecret: EXAMPLE_CLIENT_SECRET ,
48
48
callbackURL: " http://localhost:3000/auth/example/callback"
49
49
},
50
- function (accessToken , refreshToken , profile , done ) {
50
+ function (accessToken , refreshToken , profile , cb ) {
51
51
User .findOrCreate ({ exampleId: profile .id }, function (err , user ) {
52
- return done (err, user);
52
+ return cb (err, user);
53
53
});
54
54
}
55
55
));
@@ -81,19 +81,44 @@ app.get('/auth/example/callback',
81
81
- [ passport-http-bearer] ( https://github.com/jaredhanson/passport-http-bearer ) — Bearer token authentication strategy for APIs
82
82
- [ OAuth2orize] ( https://github.com/jaredhanson/oauth2orize ) — OAuth 2.0 authorization server toolkit
83
83
84
- ## Tests
84
+ ## Contributing
85
85
86
+ #### Tests
87
+
88
+ The test suite is located in the ` test/ ` directory. All new features are
89
+ expected to have corresponding test cases. Ensure that the complete test suite
90
+ passes by executing:
91
+
92
+ ``` bash
93
+ $ make test
86
94
```
87
- $ npm install
88
- $ npm test
95
+
96
+ #### Coverage
97
+
98
+ All new feature development is expected to have test coverage. Patches that
99
+ increse test coverage are happily accepted. Coverage reports can be viewed by
100
+ executing:
101
+
102
+ ``` bash
103
+ $ make test-cov
104
+ $ make view-cov
89
105
```
90
106
91
- ## Credits
107
+ ## Support
108
+
109
+ #### Funding
110
+
111
+ This software is provided to you as open source, free of charge. The time and
112
+ effort to develop and maintain this project is dedicated by [ @jaredhanson ] ( https://github.com/jaredhanson ) .
113
+ If you (or your employer) benefit from this project, please consider a financial
114
+ contribution. Your contribution helps continue the efforts that produce this
115
+ and other open source software.
92
116
93
- - [ Jared Hanson] ( http://github.com/jaredhanson )
117
+ Funds are accepted via [ PayPal] ( https://paypal.me/jaredhanson ) , [ Venmo] ( https://venmo.com/jaredhanson ) ,
118
+ and [ other] ( http://jaredhanson.net/pay ) methods. Any amount is appreciated.
94
119
95
120
## License
96
121
97
122
[ The MIT License] ( http://opensource.org/licenses/MIT )
98
123
99
- Copyright (c) 2011-2015 Jared Hanson <[ http://jaredhanson.net/ ] ( http://jaredhanson.net/ ) >
124
+ Copyright (c) 2011-2016 Jared Hanson <[ http://jaredhanson.net/ ] ( http://jaredhanson.net/ ) >
0 commit comments