Ronnie Beltran | 29 Jan 05:09
Picon

CherryPy Facebook Oauth 2.0 on Google Appengine

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.

--

-- 
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users@...
To unsubscribe from this group, send email to cherrypy-users+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en.

Gravatar

Re: CherryPy Facebook Oauth 2.0 on Google Appengine

Hi Ronnie,



On Sun, Jan 29, 2012 at 5:09 AM, Ronnie Beltran <rbbeltran.09-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
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.



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

--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to cherrypy-users+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cherrypy-users?hl=en.

Gmane