omab/django-social-auth — pull request #645 by sjagoe (2013-03-24 18:38:54+00:00)
Title: Fixed restricting guthub authorization to a single organiszation.

This takes care of the below exception when a user in an organization attempts to log in with the GitHub backend.

I expect there may still be a case where a user **not** in the organization logs in.

```python
Internal Server Error: /github-jenkins/complete/github/
Traceback (most recent call last):
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(*args, **kwargs)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/social_auth/decorators.py", line 29, in wrapper
return func(request, request.social_auth_backend, *args, **kwargs)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/social_auth/views.py", line 42, in complete
return complete_process(request, backend, *args, **kwargs)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/social_auth/views.py", line 111, in complete_process
user = auth_complete(request, backend, *args, **kwargs)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/social_auth/views.py", line 197, in auth_complete
return backend.auth_complete(user=user, request=request, *args, **kwargs)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/social_auth/backends/__init__.py", line 836, in auth_complete
*args, **kwargs)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/social_auth/backends/__init__.py", line 873, in do_auth
return authenticate(*args, **kwargs)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/django/contrib/auth/__init__.py", line 59, in authenticate
user = backend.authenticate(**credentials)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/social_auth/backends/__init__.py", line 104, in authenticate
kwargs['uid'] = self.get_user_id(kwargs['details'], response)
File "/home/sjagoe/ve-github-jenkins/lib/python2.6/site-packages/social_auth/backends/__init__.py", line 209, in get_user_id
return response[self.ID_KEY]
KeyError: 'id'
```