-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
49 lines (49 loc) · 4.87 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
"name": "passport-google-oauth",
"version": "0.1.5",
"description": "Google (OAuth) authentication strategies for Passport.",
"keywords": [
"passport",
"google",
"auth",
"authn",
"authentication",
"identity"
],
"repository": {
"type": "git",
"url": "git://github.com/jaredhanson/passport-google-oauth.git"
},
"bugs": {
"url": "http://github.com/jaredhanson/passport-google-oauth/issues"
},
"author": {
"name": "Jared Hanson",
"email": "jaredhanson@gmail.com",
"url": "http://www.jaredhanson.net/"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"main": "./lib/passport-google-oauth",
"dependencies": {
"pkginfo": "0.2.x",
"passport-oauth": "~0.1.4"
},
"devDependencies": {
"vows": "0.6.x"
},
"scripts": {
"test": "NODE_PATH=lib node_modules/.bin/vows test/*-test.js"
},
"engines": {
"node": ">= 0.4.0"
},
"readme": "# Passport-Google-OAuth\n\n[Passport](http://passportjs.org/) strategies for authenticating with [Google](http://www.google.com/)\nusing OAuth 1.0a and OAuth 2.0.\n\nThis module lets you authenticate using Google in your Node.js applications.\nBy plugging into Passport, Google authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\n[Express](http://expressjs.com/).\n\n## Install\n\n $ npm install passport-google-oauth\n\n## Usage of OAuth 1.0\n\n#### Configure Strategy\n\nThe Google OAuth 1.0 authentication strategy authenticates users using a Google\naccount and OAuth tokens. The strategy requires a `verify` callback, which\naccepts these credentials and calls `done` providing a user, as well as `options`\nspecifying a consumer key, consumer secret, and callback URL.\n\n passport.use(new GoogleStrategy({\n consumerKey: GOOGLE_CONSUMER_KEY,\n consumerSecret: GOOGLE_CONSUMER_SECRET,\n callbackURL: \"http://127.0.0.1:3000/auth/google/callback\"\n },\n function(token, tokenSecret, profile, done) {\n User.findOrCreate({ googleId: profile.id }, function (err, user) {\n return done(err, user);\n });\n }\n ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'google'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n app.get('/auth/google',\n passport.authenticate('google', { scope: 'https://www.google.com/m8/feeds' }));\n\n app.get('/auth/google/callback', \n passport.authenticate('google', { failureRedirect: '/login' }),\n function(req, res) {\n // Successful authentication, redirect home.\n res.redirect('/');\n });\n\n## Usage of OAuth 2.0\n\n#### Configure Strategy\n\nThe Google OAuth 2.0 authentication strategy authenticates users using a Google\naccount and OAuth 2.0 tokens. The strategy requires a `verify` callback, which\naccepts these credentials and calls `done` providing a user, as well as\n`options` specifying a client ID, client secret, and callback URL.\n\n passport.use(new GoogleStrategy({\n clientID: GOOGLE_CLIENT_ID,\n clientSecret: GOOGLE_CLIENT_SECRET,\n callbackURL: \"http://127.0.0.1:3000/auth/google/callback\"\n },\n function(accessToken, refreshToken, profile, done) {\n User.findOrCreate({ googleId: profile.id }, function (err, user) {\n return done(err, user);\n });\n }\n ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'google'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n app.get('/auth/google',\n passport.authenticate('google'));\n\n app.get('/auth/google/callback', \n passport.authenticate('google', { failureRedirect: '/login' }),\n function(req, res) {\n // Successful authentication, redirect home.\n res.redirect('/');\n });\n\n## Examples\n\nFor a complete, working example, refer to the [OAuth 1.0 example](https://github.com/jaredhanson/passport-google-oauth/tree/master/examples/oauth)\nand the [OAuth 2.0 example](https://github.com/jaredhanson/passport-google-oauth/tree/master/examples/oauth2).\n\n## Tests\n\n $ npm install --dev\n $ make test\n\n[![Build Status](https://secure.travis-ci.org/jaredhanson/passport-google-oauth.png)](http://travis-ci.org/jaredhanson/passport-google-oauth)\n\n## Credits\n\n - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2012-2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n",
"readmeFilename": "README.md",
"_id": "passport-google-oauth@0.1.5",
"_from": "passport-google-oauth@0.1.5"
}