Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google+ Sign-in Support #115

Closed
kentcdodds opened this issue Mar 12, 2013 · 14 comments
Closed

Google+ Sign-in Support #115

kentcdodds opened this issue Mar 12, 2013 · 14 comments

Comments

@kentcdodds
Copy link

As mentioned in this StackOverflow post there is a new authentication method provided by Google. I would like to request support for this authentication method.

@mastix
Copy link

mastix commented Mar 13, 2013

+1 :)

@frozonfreak
Copy link

+1 that :)

@SimonTomlin
Copy link

This will be an excellent addition to an already superb module +1

@amohrhard
Copy link

+1

@bobslaede
Copy link

+4

@psaia
Copy link

psaia commented May 10, 2013

I needed this for an upcoming project so I went ahead and wrote a strategy.

https://github.com/LevInteractive/passport-google-plus

It's fairly straight forward. If everyone agrees I could npm publish it. I've also updated the example so you can see it in action. Hope it helps!

@kentcdodds
Copy link
Author

@petesaia awesome! Thanks for doing that. As feedback, I'd say you may want to consider renaming it. When people look for it I think they'll search for "google+ passportjs". So maybe a more appropriate name would be: passport-google-plus.

@psaia
Copy link

psaia commented May 10, 2013

@kentcdodds I agree. When I started out writing it I thought it might be used for all of the Google oauth services and not just Google Plus, but I think it's much simpler just to have it for a specific service now. It is now renamed.

https://github.com/LevInteractive/passport-google-plus

@psaia
Copy link

psaia commented May 10, 2013

I actually think this passport strategy was a good effort, but all for not. Before writing it I seem to have miseed this: https://github.com/jaredhanson/passport-google-oauth. So a Google Plus strategy existed all along.

It is identical to passport-google-plus except, like my original goal, it can be used for ALL of the Google services depending on the scope used. Unless anyone can give a reason not to use that module instead, I will be removing https://github.com/LevInteractive/passport-google-plus and I think this issue should be closed so no one else attempts to write a strategy specifically for G+.

@SimonTomlin
Copy link

That is the one I use for google+.
I asked for an update before reading Jareds comments on a stack overflow
question regarding using oauth2 since Google has moved or is moving to
this. I use with no problems after I changed over from the opendId version.

I kept meaning to post something on this thread

var passport = require('passport')
, GoogleStrategy = require('passport-google-oauth').OAuth2Strategy
// , GoogleStrategy = require('passport-google').Strategy
, FacebookStrategy = require('passport-facebook').Strategy;

On Fri, May 10, 2013 at 3:38 PM, Pete Saia notifications@github.com wrote:

I actually think this passport module was a good effort, but all for not.
Before writing it I seem to have miseed this:
https://github.com/jaredhanson/passport-google-oauth

It is identical to passport-google-plus except, like my original goal, it
can be used for ALL of the Google services depending on the scope used.
Unless anyone can give a reason not to use that module instead, I will be
removing https://github.com/LevInteractive/passport-google-plus


Reply to this email directly or view it on GitHubhttps://github.com//issues/115#issuecomment-17723830
.

@jaredhanson
Copy link
Owner

@petesaia It might be an OK idea to have passport-google-plus inherit from passport-google-oauth, and default the scope so that it works out of the box. But yes, Google+ sign in is just OAuth 2 with some extra client-side UI.

@psaia
Copy link

psaia commented May 10, 2013

@jaredhanson I personally don't see a lot of benefit in having an entire codebase just to have something like options.scope = options.scope || 'https://www.googleapis.com/auth/userinfo.profile';

If anything I think perhaps the README for passport-google-oauth could have information for Google Plus simply so it shows up in google searches. Another alternative would be to have a property like google_plus which could take a boolean to add the correct scope in for you, but even that to me seems like overkill.

@jaredhanson
Copy link
Owner

Fair enough. I'll make note of it in the README.

@jaredhanson
Copy link
Owner

Closing. Google+ Sign-In is just OAuth 2.0. Use passport-google-oauth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants