title: Django Social Login: 'AsgiRequest' object has no attribute 'session'
body: <p>Got an error when trying social-app-django (2.1.0), the error thrown was:</p>
  
  <blockquote>
    <p>'AsgiRequest' object has no attribute 'session'</p>
  </blockquote>
  
  <ul>
  <li>Running with channels 1.1.8, Django 2.0.3, asgi-redis 1.2.0, python 3.6</li>
  <li>Running via python manage.py runserver (development environment) not uwgsi or nginx.</li>
  </ul>
  
  <p>The occurs when trying to access /social/login/google-oauth2/ (authenticating with google account).</p>
  
  <p>I have read about changing <strong>MIDDLEWARE_CLASSES</strong> to <strong>MIDDLEWARE</strong> but we have been using Django >=1.9 for a while so it has already been changed. </p>
  
  <p>The traceback looks as follows:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):<br>
      File "/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35,in inner<br>
        response = get_response(request)  </p>
    
    <p>File "/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response<br>
        response = self.process_exception_by_middleware(e, request)  </p>
    
    <p>File "/lib/python3.6/site-packages/channels/handler.py", line 243, in process_exception_by_middleware<br>
        return super(AsgiHandler, self).process_exception_by_middleware(exception, request)  </p>
    
    <p>File "/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response<br>
        response = wrapped_callback(request, *callback_args, **callback_kwargs)  </p>
    
    <p>File "/lib/python3.6/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func<br>
        response = view_func(request, *args, **kwargs)  </p>
    
    <p>File "/lib/python3.6/site-packages/social_django/utils.py", line 38, in wrapper<br>
        request.social_strategy = load_strategy(request)  </p>
    
    <p>File "/lib/python3.6/site-packages/social_django/utils.py", line 23, in load_strategy<br>
        return get_strategy(STRATEGY, STORAGE, request)  </p>
    
    <p>File "/lib/python3.6/site-packages/social_core/utils.py", line 279, in get_strategy<br>
        return Strategy(Storage, *args, **kwargs)  </p>
    
    <p>File "/lib/python3.6/site-packages/social_django/strategy.py", line 39, in <strong>init</strong><br>
        self.session = request.session if request else {}<br>
    AttributeError: 'AsgiRequest' object has no attribute 'session'  </p>
  </blockquote>
  
  <p>Middleware is the following (added because other <strong>WsgiRequest has no attribute session</strong> have been related with middleware): </p>
  
  <pre><code>MIDDLEWARE = [
      "django.contrib.sessions.middleware.SessionMiddleware",
      "django.contrib.auth.middleware.AuthenticationMiddleware",
      "django.contrib.auth.middleware.SessionAuthenticationMiddleware",
      "django.contrib.messages.middleware.MessageMiddleware",
      "django.middleware.common.CommonMiddleware",
      "django.middleware.csrf.CsrfViewMiddleware",
      "django.middleware.security.SecurityMiddleware",
  
      "social_django.middleware.SocialAuthExceptionMiddleware",
  
      "django.middleware.cache.UpdateCacheMiddleware",
      "django.middleware.common.CommonMiddleware",
      "django.middleware.cache.FetchFromCacheMiddleware",
  ]
  </code></pre>