I’m trying to get the current user for a Gmail gadget, but it seems users.get_current_user() returns None, even though I’m obviously logged in.
Am I missing something?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t use the Users API directly within a Gmail gadget, but you can use a combination of OpenID and the gadgets APIs to authenticate your users. The document was writing in the context of a Gmail contextual gadget (which is installed via the Google Apps Marketplace), but the principles will still apply for non-contextual gadgets.
The biggest difference between what is outlined in the document and what happens in a non-contextual gadget is that Google Apps Marketplace applications (and their companion gadgets) are automatically whitelisted for OpenID. Without a Marketplace install, users will see an OpenID approval screen the first time they load your gadget.