Unified OAuth and Users service

62 views
Skip to first unread message

George Moschovitis

unread,
May 28, 2010, 11:17:34 AM5/28/10
to Google App Engine
I was very pleased to see that the new OAuth API provides the same
interface as the Users API, but I see a missed opportunity here:

If we had a unified API, ie:

getCurrentUser()

returned the user either through sign-in or OAuth we could use one
code path for both cases...

Does this make sense? Is there a problem I am not seeing?

-g.

Robert Kluin

unread,
May 28, 2010, 11:39:12 AM5/28/10
to google-a...@googlegroups.com
Hi George,
What about using "get_current_user()"?

Robert

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>
>

George Moschovitis

unread,
May 28, 2010, 4:18:16 PM5/28/10
to Google App Engine
>   What about using "get_current_user()"?

yeah I meant get_current_user()...
my problem is that there are two versions of the method:

google.appengine.api.oauth.get_current_user()
google.appengine.api.users.get_current_user()

one works with OAuth and one with sign-in (or am I wrong?).

I would like google.appengine.api.users.get_current_user() to work
with OAuth authenticated users too, ie a unified authentication
mechanism.

-g.

--
http://www.appenginejs.org

Robert Kluin

unread,
May 28, 2010, 6:51:27 PM5/28/10
to google-a...@googlegroups.com
Let us know if you make a feature request so we can star it.

I also notice get_current_user() seems to have two very different
behaviors for OAuth vs Google accounts. The Google accounts returns
None while the OAuth version raises an exception if the user is not
logged in.


Robert

George Moschovitis

unread,
May 29, 2010, 12:02:50 PM5/29/10
to Google App Engine
Reply all
Reply to author
Forward
0 new messages