-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GitHub Oauth registration and login
Added GitHub Oauth which uses JWT REST API for authenticating users. Fixes #101
- Loading branch information
1 parent
f1d266a
commit e158599
Showing
5 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,51 @@ | ||
appdirs==1.4.4 | ||
asgiref==3.2.7 | ||
astroid==2.4.1 | ||
black==20.8b1 | ||
certifi==2020.6.20 | ||
cffi==1.14.1 | ||
chardet==3.0.4 | ||
click==7.1.2 | ||
cryptography==3.0 | ||
defusedxml==0.6.0 | ||
distro==1.5.0 | ||
dj-rest-auth==2.1.3 | ||
Django==3.0.7 | ||
django-allauth==0.44.0 | ||
django-cors-headers==3.3.0 | ||
django-sendgrid-v5==0.8.1 | ||
djangorestframework==3.11.0 | ||
djangorestframework-jwt==1.11.0 | ||
djangorestframework-simplejwt==4.4.0 | ||
flake8==3.8.4 | ||
future==0.18.2 | ||
idna==2.10 | ||
isort==4.3.21 | ||
isort==5.7.0 | ||
lazy-object-proxy==1.4.3 | ||
matrix-client==0.3.2 | ||
mccabe==0.6.1 | ||
mypy-extensions==0.4.3 | ||
oauthlib==3.1.0 | ||
pathspec==0.8.1 | ||
psycopg2==2.8.5 | ||
pycodestyle==2.6.0 | ||
pycparser==2.20 | ||
pyflakes==2.2.0 | ||
PyJWT==1.7.1 | ||
pylint==2.5.2 | ||
pyOpenSSL==19.1.0 | ||
python-dotenv==0.13.0 | ||
python-http-client==3.2.7 | ||
python3-openid==3.2.0 | ||
pytz==2020.1 | ||
regex==2020.11.13 | ||
requests==2.24.0 | ||
requests-oauthlib==1.3.0 | ||
sendgrid==6.3.1 | ||
six==1.15.0 | ||
sqlparse==0.3.1 | ||
toml==0.10.1 | ||
typed-ast==1.4.1 | ||
typing-extensions==3.7.4.3 | ||
urllib3==1.25.10 | ||
wrapt==1.12.1 | ||
zulip==0.7.0 | ||
zulip==0.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from allauth.socialaccount.providers.github.views import GitHubOAuth2Adapter | ||
from allauth.socialaccount.providers.oauth2.client import OAuth2Client | ||
from dj_rest_auth.registration.views import SocialLoginView | ||
from django.conf import settings | ||
|
||
|
||
class GithubLogin(SocialLoginView): | ||
authentication_classes = [] | ||
adapter_class = GitHubOAuth2Adapter | ||
callback_url = settings.GITHUB_CALLBACK_URL | ||
client_class = OAuth2Client |