Skip to content
This repository
Browse code

Merge pull request #57 from coalitions/google-oauth

Google oauth
  • Loading branch information...
commit 3f180abc8994e399afbee4f285175165ff75d8a7 2 parents 38e6411 + 57fb4da
Brian Noguchi authored January 03, 2012
4  example/conf.js
@@ -19,4 +19,8 @@ module.exports = {
19 19
         clientId: 'VUGE4VHJMKWALKDKIOH1HLD1OQNHTC0PBZZBUQSHJ3WKW04K'
20 20
       , clientSecret: '0LVAGARGUN05DEDDRVWNIMH4RFIHEFV0CERU3OITAZW1CXGX'
21 21
     }
  22
+  , google: {
  23
+        clientId: '224794776836-cp3a2v0elt955h9uqhgmskplhg85ljjm.apps.googleusercontent.com'
  24
+      , clientSecret: 'rxGFo1mBG_H3DX2ifDFawiMZ'
  25
+    }
22 26
 };
9  example/server.js
@@ -76,6 +76,15 @@ UserSchema.plugin(mongooseAuth, {
76 76
         , redirectPath: '/'
77 77
       }
78 78
     }
  79
+  , google: {
  80
+      everyauth: {
  81
+          myHostname: 'http://localhost:3000'
  82
+        , appId: conf.google.clientId
  83
+        , appSecret: conf.google.clientSecret
  84
+        , redirectPath: '/'
  85
+        , scope: 'https://www.google.com/m8/feeds'
  86
+      }
  87
+    }
79 88
 });
80 89
 // Adds login: String
81 90
 
17  example/views/home.jade
@@ -4,16 +4,18 @@
4 4
     a(href='/register') Register
5 5
   #password-login
6 6
     a(href='/login', style='border: 0px') Login with Password
7  
-  #fb-login.fb_button(style='float: left; background-position:left -188px')
8  
-    a.fb_button_medium(href='/auth/facebook')
9  
-      span#fb_login_text.fb_button_text
10  
-        Connect with Facebook
11  
-  #twitter-login.fb_button(style='float: left; margin-left: 5px')
  7
+  #fb-login(style='float: left; margin-left: 5px')
  8
+    a(href='/auth/facebook', style='border: 0px')
  9
+      img(style='border: 0px', src='http://github.com/intridea/authbuttons/raw/master/png/facebook_64.png')
  10
+  #twitter-login(style='float: left; margin-left: 5px')
12 11
     a(href='/auth/twitter', style='border: 0px')
13  
-      img(style='border: 0px', src='http://apiwiki.twitter.com/f/1242697715/Sign-in-with-Twitter-darker.png')
  12
+      img(style='border: 0px', src='http://github.com/intridea/authbuttons/raw/master/png/twitter_64.png')
14 13
   #github-login(style='float: left; margin-left: 5px')
15 14
     a(href='/auth/github', style='border: 0px')
16 15
       img(style='border: 0px', src='http://github.com/intridea/authbuttons/raw/master/png/github_64.png')
  16
+  #google-login(style='float: left; margin-left: 5px')
  17
+    a(href='/auth/google', style='border: 0px')
  18
+      img(style='border: 0px', src='http://github.com/intridea/authbuttons/raw/master/png/google_64.png')
17 19
   #instagram-login(style='float: left; margin-left: 5px')
18 20
     a(href='/auth/instagram', style='border: 0px')
19 21
       img(style='border: 0px', src='https://instagram.com/static/images/headerWithTitle.png')
@@ -29,6 +31,9 @@
29 31
   - if (everyauth.github)
30 32
     h3 GitHub User Data
31 33
     p= JSON.stringify(everyauth.github.user)
  34
+  - if (everyauth.google)
  35
+    h3 Google User Data
  36
+    p= JSON.stringify(everyauth.google.user)
32 37
   - if (everyauth.instagram)
33 38
     h3 Instagram User Data
34 39
     p= JSON.stringify(everyauth.instagram.user)
10  package.json
... ...
@@ -1,11 +1,11 @@
1 1
 {
2  
-  "name": "mongoose-auth",
3  
-  "description": "User authentication plugin for mongoose node.js orm",
  2
+  "name": "mongoose-auth-coalitions",
  3
+  "description": "Coalitions fork of user authentication plugin for mongoose node.js orm",
4 4
   "version": "0.0.11",
5  
-  "homepage": "https://github.com/bnoguchi/mongoose-auth/",
  5
+  "homepage": "https://github.com/coalitions/mongoose-auth/",
6 6
   "repository": {
7 7
     "type": "git",
8  
-    "url": "git://github.com/bnoguchi/mongoose-auth.git"
  8
+    "url": "git://github.com/coalitions/mongoose-auth.git"
9 9
   },
10 10
   "author": "Brian Noguchi <brian.noguchi@gmail.com> (https://github.com/bnoguchi/)",
11 11
   "main": "./index.js",
@@ -15,7 +15,7 @@
15 15
   "dependencies": {
16 16
     "bcrypt":">=0.2.0",
17 17
     "mongoose": ">=1.4.0",
18  
-    "everyauth": ">=0.2.11",
  18
+    "everyauth": "0.2.23",
19 19
     "mongoose-types": ">=1.0.3"
20 20
   },
21 21
   "devDependencies": {

0 notes on commit 3f180ab

Please sign in to comment.
Something went wrong with that request. Please try again.