[Fixed]-Python Social auth authentication via access-token fails


In you register_by_access_token view, you are getting access_token in GET params

user = request.backend.do_auth(request.GET.get('access_token'))

and url you defiend is:

url(r'^register-by-token/(?P<backend>[^/]+)/$', 'register_by_access_token')

So you need to request something like:

GET http://localhost:8000/register-by-token/google-oauth2/?access_token=<access_token>

whereas, you are doing:

GET http://localhost:8000/register-by-token/google-oauth2/<access-token>/

You are passing access_token in url params, which is wrong.

Leave a comment