Auth with Google Oauth2 - Google Plus, Gmail and other scopes

651 views
Skip to first unread message

Bruno Rocha

unread,
Jan 16, 2012, 4:48:07 AM1/16/12
to web...@googlegroups.com
Hi,

I just implemented Google Connect Oauth2 in http://movu.ca/demo

If someone interested in the code it is in

https://github.com/rochacbruno/Movuca/blob/master/modules/oauth20_account_google.py (modified module)
https://github.com/rochacbruno/Movuca/blob/master/modules/helpers/googleplus.py (modified handler, can go in models or modules)
https://github.com/rochacbruno/Movuca/blob/master/modules/handlers/person.py#L378 (action handler)
https://github.com/rochacbruno/Movuca/blob/master/controllers/person.py#L95 (controller)

It is based in the facebook version with some changes, but still needs improvements.

To use it you have to create API keys in https://code.google.com/apis/console/ and the other things will be just like the facebook version. I guess the twitter version can be implemented in the same way.

** im my code I am using Movuca config to get the option values, you just need to replace them with your API keys.

I also found an issue in Auth http://code.google.com/p/web2py/issues/detail?id=616


--

Michele Comitini

unread,
Jan 16, 2012, 6:25:22 AM1/16/12
to web...@googlegroups.com
Hi Bruno,

Do you think we can integrate all in one oath20 module?

tnx

mic

2012/1/16 Bruno Rocha <rocha...@gmail.com>:

Bruno Rocha

unread,
Jan 16, 2012, 12:44:16 PM1/16/12
to web...@googlegroups.com

yes we can! the difference is only some keys passed to auth and token url, also the redirect page and the api caller.

I think we can create an api proxy to decide which class to use and have the google/facebook/linkedin etc mappings in a single file.

I will try and if works I send a patch.

http://zerp.ly/rochacbruno

Daniel Gonzalez

unread,
Jul 13, 2012, 2:46:44 AM7/13/12
to web...@googlegroups.com
Hi Bruno,

This is greate code, thanks! I would like to do something very similar to authenticate users via Facebook, Google and Twitter. I have several questions:
  • Has the code been integrated into web2py?
  • Is this intended only for Google+, or can normal Google accounts also use the same code?
  • Would it be easy to integrate twitter too?
I am willing to contribute any improvements I need to do in order generalize this code even more, of course.

Thanks,
Daniel

Alec Taylor

unread,
Aug 17, 2012, 7:26:10 AM8/17/12
to web...@googlegroups.com
Hi Bruno,

Can we get an update on this?

Thanks
Reply all
Reply to author
Forward
0 new messages