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.
+1 that :)
This will be an excellent addition to an already superb module +1
I needed this for an upcoming project so I went ahead and wrote a strategy.
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!
@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.
@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.
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+.
@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.
@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';
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.
Fair enough. I'll make note of it in the README.
Closing. Google+ Sign-In is just OAuth 2.0. Use passport-google-oauth.