Arachnid / aeoid

Easy OpenID support for App Engine
47 stars 3 forks source link

nickname() and email() dont work. #10

Open pbiggar opened 14 years ago

pbiggar commented 14 years ago

When I log in using a google account, nickname() and email() are both None. Looking at the dashboard, both nickname and email are None, but server_url is filled in. I checked that those fields were enabled in my profile, and they were.

The endpoint is https://www.google.com/accounts/o8/id.

modkit commented 14 years ago

Yes. I also have the same issue.. I entered the following endpoint into the openid url box:

https://www.google.com/accounts/o8/id

I am then redirected to a google accounts login page, but am not told that I am sharing my email and nickname as is expected..

For example, when logging into demand.openid.net through openid and my google account, I get the following before login:

Demand-openid.rpxnow.com is asking for some information from your Google Account. To see and approve the request, sign in. Learn more

and the following after logging in:

Demand-openid.rpxnow.com is asking for some information from your Google Account username@gmail.com • Email address: nickname (username@gmail.com) • Language: English

But when coming from your demo app, I get the following before signing in:

Sign in to Myplaysandbox.appspot.com with your Google Account. Learn more

And the following after:

You are signing in to Myplaysandbox.appspot.com with your Google Account xxxx@gmail.com

Can you verify that the nickname and email features are working with other providers and which ones.. The demo app is up at: http://myplaysandbox.appspot.com. Are you able to login and see your nickname in the demo? I'm motivated to track down this problem, but would like to verify what state the aeoid lib is in and if this is a google specific problem or not..

Arachnid commented 14 years ago

I know they work with myvidoop. It's using the sreg extension, so I don't know why it wouldn't work. I'll look into it.

modkit commented 14 years ago

At quick glance it doesn't seem google is using the sreg extension so we may need to use the attribute exchange (AX) extension:

http://code.google.com/apis/accounts/docs/OpenID.html#Parameters

yesudeep commented 14 years ago

Facing the same issue.

modkit commented 14 years ago

@yesudeep.. The problem is as explained.. You need to use AX not SREG.. I have a version in progress.. You can try it at http://myplaysandbox.appspot.com

Haven't gotten around to polishing and submitting but you can send me a private message if you want the source..

Arachnid commented 14 years ago

@modkit People are clamouring for the patch. No pressure. ;)

EvanK commented 14 years ago

Even if we use AX, we still have to know what to ask for.

What if we have a hypothetical provider that makes available an email but nothing even closely resembling a nickname? Should we fill it in with the email, as App Engine's own User class does?

And then of course, we have providers out there that support neither SREG nor AX, like MySpace. In this case, nickname and email will be empty regardless, so they're just a lost cause.

So it seems to me that the best solution would be to use both SREG and AX, then use whichever the provider returns. If they return both (don't know if that's even possible), just favor the simplest one (SREG?)

ADDENDUM: We also have providers who support one or the other (or both), but don't advertise it in their XRDS, like AOL.