Since we are getting an increasing number of users coming to our sites (phpclasses.org and jsclasses.org) from StackOverflow, we decided to implement support to let users with StackOverflow accounts to login in our sites.
The OpenID authentication with http://openid.stackexchange.com/ is working fine as with other OpenID 2 providers that we support like Yahoo, except that the user e-mail address as ax attribute is not being returned. We use the e-mail address as unique key avoid multiple accounts being created by the same user.
I don't know if this is intentional or if it has to do with the parameters that we are passing to StackExchange OpenID provider. I read something about a whitelist somewhere but I am not sure if it is related with the problem.
Can anybody clarify why it is not returning the account email address as ax attribute?
Here follows the attributes that we are passing with the checkid_setup message.
http://accounts.icontem.local/ is our development site that manages the all the accounts of our users and provides single sign-on services to our actual sites. The production single sign-on site is actually https://accounts.icontem.com/ but we have not enabled StackExchange support there until we sort this issue.
Here is a sample of the list of parameters that we are passing during the initial POST redirect request.
Redirecting to OpenID provider https://openid.stackexchange.com/openid/provider openid.mode=checkid_setup openid.identity=http://specs.openid.net/auth/2.0/identifier_select openid.trust_root= openid.return_to=http://accounts.icontem.local/external/?server=StackExchange&return_to= openid.assoc_handle={634798386067877388}{eD8w5Q==}{20} openid.ax.type.email=http://axschema.org/contact/email openid.ax.type.nickname=http://axschema.org/namePerson/friendly openid.ax.type.fullname=http://axschema.org/namePerson openid.ax.mode=fetch_request openid.ns.ax=http://openid.net/srv/ax/1.0 openid.ax.if_available=email,nickname,fullname openid.ns=http://specs.openid.net/auth/2.0 openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select