CPAN-API/cpan-api — pull request #249 by zostay (2013-01-26 23:32:12+00:00)
Title: Google authentication for MetaCPAN

I believe this is pretty close to done. This is most, if not all, the changes required to implement issue #241. The only part I have not fully tested is the complete end-to-end integration with metacpan-web as there something in my sandbox setup that's keeping that from working at the moment. However, this will successfully authenticate against google and fetch a unique user ID for the user via the Google APIs.

For reference, you may want to read:

*
*

These are the relevant docs on how to implement Google's flavor of OAuth2. I tested using the "https://www.googleapis.com/auth/userinfo.profile" scope, which provides a unique user ID. It also grants access to the basic details of the user's Google+ profile. The other suggested scope is "https://www.googleapis.com/auth/userinfo.email" which might be preferred. Based on the information shared from Facebook with MetaCPAN, though, I suspect userinfo.profile is probably the way to go.

You will need to register MetaCPAN on the Google APIs Console:

*

You'll need to setup the redirect URI as:

*

Other than that, I think the other settings are up to you. I think that's about it. Please send me an email (sterling at [my-last-name] .com) if you have questions. You can try to ping me on IRC as well, but I'm not on there or always paying attention.