session is missing on httpresponse redirect to google oauth

20 views
Skip to first unread message

Aswani Kumar

unread,
Nov 20, 2013, 12:42:16 AM11/20/13
to django...@googlegroups.com
here is my code

@login_required
def gpconnect(request):

    if 'code' in request.REQUEST:

            # insert google data to db            
            
            return render_to_response('social/google.html')
  
    else:
        rty="https://accounts.google.com/o/oauth2/auth?client_id="+GP_CLIENT_ID+"&response_type=code"
        return HttpResponseRedirect(rty)


this is working for few and not for few users.
its going to google in the first call by satisfying login required true.
but the user data is missing when the user come back from google after authorizing our app and raising login_required.

please help me with any idea.



Reply all
Reply to author
Forward
0 new messages