Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #57 from coalitions/google-oauth

Google oauth
  • Loading branch information...
commit 3f180abc8994e399afbee4f285175165ff75d8a7 2 parents 38e6411 + 57fb4da
@bnoguchi authored
View
4 example/conf.js
@@ -19,4 +19,8 @@ module.exports = {
clientId: 'VUGE4VHJMKWALKDKIOH1HLD1OQNHTC0PBZZBUQSHJ3WKW04K'
, clientSecret: '0LVAGARGUN05DEDDRVWNIMH4RFIHEFV0CERU3OITAZW1CXGX'
}
+ , google: {
+ clientId: '224794776836-cp3a2v0elt955h9uqhgmskplhg85ljjm.apps.googleusercontent.com'
+ , clientSecret: 'rxGFo1mBG_H3DX2ifDFawiMZ'
+ }
};
View
9 example/server.js
@@ -76,6 +76,15 @@ UserSchema.plugin(mongooseAuth, {
, redirectPath: '/'
}
}
+ , google: {
+ everyauth: {
+ myHostname: 'http://localhost:3000'
+ , appId: conf.google.clientId
+ , appSecret: conf.google.clientSecret
+ , redirectPath: '/'
+ , scope: 'https://www.google.com/m8/feeds'
+ }
+ }
});
// Adds login: String
View
17 example/views/home.jade
@@ -4,16 +4,18 @@
a(href='/register') Register
#password-login
a(href='/login', style='border: 0px') Login with Password
- #fb-login.fb_button(style='float: left; background-position:left -188px')
- a.fb_button_medium(href='/auth/facebook')
- span#fb_login_text.fb_button_text
- Connect with Facebook
- #twitter-login.fb_button(style='float: left; margin-left: 5px')
+ #fb-login(style='float: left; margin-left: 5px')
+ a(href='/auth/facebook', style='border: 0px')
+ img(style='border: 0px', src='http://github.com/intridea/authbuttons/raw/master/png/facebook_64.png')
+ #twitter-login(style='float: left; margin-left: 5px')
a(href='/auth/twitter', style='border: 0px')
- img(style='border: 0px', src='http://apiwiki.twitter.com/f/1242697715/Sign-in-with-Twitter-darker.png')
+ img(style='border: 0px', src='http://github.com/intridea/authbuttons/raw/master/png/twitter_64.png')
#github-login(style='float: left; margin-left: 5px')
a(href='/auth/github', style='border: 0px')
img(style='border: 0px', src='http://github.com/intridea/authbuttons/raw/master/png/github_64.png')
+ #google-login(style='float: left; margin-left: 5px')
+ a(href='/auth/google', style='border: 0px')
+ img(style='border: 0px', src='http://github.com/intridea/authbuttons/raw/master/png/google_64.png')
#instagram-login(style='float: left; margin-left: 5px')
a(href='/auth/instagram', style='border: 0px')
img(style='border: 0px', src='https://instagram.com/static/images/headerWithTitle.png')
@@ -29,6 +31,9 @@
- if (everyauth.github)
h3 GitHub User Data
p= JSON.stringify(everyauth.github.user)
+ - if (everyauth.google)
+ h3 Google User Data
+ p= JSON.stringify(everyauth.google.user)
- if (everyauth.instagram)
h3 Instagram User Data
p= JSON.stringify(everyauth.instagram.user)
View
10 package.json
@@ -1,11 +1,11 @@
{
- "name": "mongoose-auth",
- "description": "User authentication plugin for mongoose node.js orm",
+ "name": "mongoose-auth-coalitions",
+ "description": "Coalitions fork of user authentication plugin for mongoose node.js orm",
"version": "0.0.11",
- "homepage": "https://github.com/bnoguchi/mongoose-auth/",
+ "homepage": "https://github.com/coalitions/mongoose-auth/",
"repository": {
"type": "git",
- "url": "git://github.com/bnoguchi/mongoose-auth.git"
+ "url": "git://github.com/coalitions/mongoose-auth.git"
},
"author": "Brian Noguchi <brian.noguchi@gmail.com> (https://github.com/bnoguchi/)",
"main": "./index.js",
@@ -15,7 +15,7 @@
"dependencies": {
"bcrypt":">=0.2.0",
"mongoose": ">=1.4.0",
- "everyauth": ">=0.2.11",
+ "everyauth": "0.2.23",
"mongoose-types": ">=1.0.3"
},
"devDependencies": {
Please sign in to comment.
Something went wrong with that request. Please try again.