[Django]-Python-openid doesn't provide ax or sreg attributes

4๐Ÿ‘

โœ…

I was having problems with Google returning not the schema.openid.net values for AttributeExchange. It was returning None just like you mentioned, and the worst part is that it used to work when I first wrote my OpenID handlers.

Once I switched over to the axschema values in my implementation, it worked like a charm. ex:

    URLS = {
      'ax_email': 'http://axschema.org/contact/email',
      'ax_first': 'http://axschema.org/namePerson/first',
    }

    ...

    ax_request = ax.FetchRequest()
    ax_request.add(ax.AttrInfo(URLS['ax_email'], required = True))
    ax_request.add(ax.AttrInfo(URLS['ax_first'], required = True))

    auth_request.addExtension(ax_request)
๐Ÿ‘คThurloat

Leave a comment