We were previously using openID 2.0, and have a database full of users and their associated openids. In light of the deprecation of this protocol we decided to go with Google+ signins instead.
python-social-auth
made this relatively straightforward in the Django project, but now I'm unsure of how to map our existing user's openid to the newer Google sub id.
I added
SOCIAL_AUTH_AUTH_EXTRA_ARGUMENTS = {'openid.realm': 'http://www.example.com'}
to the settings.py, and I can see python-social-auth
has took note and passes ?openid.realm=http://www.example.com
in the GET string along with scopes etc, as it should. However Google does not seem to respond with an OpenID id. I only get the id_token
(along with access_token
, bearer
etc).
How do I get Google to respond with the actual openid for the user?
(the only docs from Google I can find on OpenID2.0 to Google+ migration, seem more geared toward their javascript signin buttong, e.g. https://developers.google.com/+/api/auth-migration#oid2)
EDIT: Maybe the id is encoded somehow in the id_token
, if so, how do I decode?