Skip to content

Commit

Permalink
Initialize passport Google OID strategy as stateless
Browse files Browse the repository at this point in the history
  • Loading branch information
kynan committed Apr 22, 2014
1 parent 814821a commit 87272a8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ require('zappajs') host, port, ->

passport.use new googOID
returnURL: "#{baseurl}/auth/google/return"
, realm: baseurl
, (identifier, profile, done) ->
console.log 'user logged in:', identifier, profile
db.findOrCreateUser identifier, (err, user) ->
profile._id = identifier
done err, profile
realm: baseurl
stateless: true
, (identifier, profile, done) ->
console.log 'user logged in:', identifier, profile
db.findOrCreateUser identifier, (err, user) ->
profile._id = identifier
done err, profile

passport.serializeUser (user, done) ->
done null, user
Expand Down

0 comments on commit 87272a8

Please sign in to comment.