CherryPy Facebook Oauth 2.0 on Google Appengine

227 views
Skip to first unread message

Ronnie Beltran

unread,
Jan 28, 2012, 11:09:55 PM1/28/12
to cherrypy-users
I'm trying to port a sample facebook oauth 2.0 auth from webapp to
cherrypy. however it always return a None value in self.current_user.
I think I'm having trouble with settings cookies here. any
corrections? see http://errorpaste.appspot.com/logs/4001/cherrypy-facebook-authentication-on-google-appengine
for more deatils.

Sylvain Hellegouarch

unread,
Feb 7, 2012, 5:18:43 AM2/7/12
to cherryp...@googlegroups.com
Hi Ronnie,


It may not be the cause of your error, you shouldn't set attributes to the Root class when using it as a CherryPy application since CP is threaded. Rather attach it to the current request object.
Though it might not answer your specific use case, you might want to look at this code for an example of OAuth with CherryPy:

The tool that attaches the current user to the current request:

The plugin that provides OAuth support for the application:

The app itself:

How you setup everything together:

--
- Sylvain
http://www.defuze.org
http://twitter.com/lawouach
Reply all
Reply to author
Forward
0 new messages