mongoose-auth icon indicating copy to clipboard operation
mongoose-auth copied to clipboard

Ability to add Google Authentication

Open mohamedmansour opened this issue 14 years ago • 4 comments

Any plans to support Google auth? Would be nice to support such thing.. If you have any tips on how to support it, please let me know!

mohamedmansour avatar Sep 13 '11 03:09 mohamedmansour

Hi @mohamedmansour i just did a pull request adding that support. Possibly Brian can't work on this these days. If you need this patch you can check the diff on the pull request or just clone my fork and use the google-oauth branch.

cronopio avatar Sep 17 '11 02:09 cronopio

Nice work, @cronopio! I'm going to see if I can't replace my node-oauth code from last night with this. :)

martindale avatar Sep 17 '11 02:09 martindale

Thanks!!

I just test the thing using the next config

module.exports = function(app) {
  MyUserModel.plugin(mongooseAuth, {
      everymodule: {
        everyauth: {
          User: function(){
            return app.set('db').usuario; // I'm using express
          }
        }
      }
    , google: {
      everyauth: {
        appId:'XXXXXXXXXXX.apps.googleusercontent.com'
      , appSecret:'xxxxxxxxxxxxxxx'
      , scope:'https://www.google.com/m8/feeds'
      , redirectPath: '/'
      }
    }
  });
}

cronopio avatar Sep 17 '11 02:09 cronopio

Just adding my +1 for Brian adding @cronopio's google auth to the main repo.

k00k avatar Nov 22 '11 14:11 k00k