def dispatch(self, request):
    callback_url = reverse((self.adapter.provider_id + '_callback'))
    request.session['oauth_login_state'] = SocialLogin.marshall_state(request)
    client = self._get_client(request, callback_url)
    try:
        return client.get_redirect()
    except OAuthError:
        return render_authentication_error(request)
def dispatch(self, request):
    callback_url = reverse((self.adapter.provider_id + '_callback'))
    request.session['oauth_login_state'] = SocialLogin.marshall_state(request)
    client = self._get_client(request, callback_url)
    try:
        return client.get_redirect()
    except OAuthError:
        return render_authentication_error(request)