A Django Social Authentication via django-allauth
- Django 2.0 and Python 3.6
- django-allauth for easy social auth
- Pipenv for virtualenvs
-
Make sure Python 3.6x and Pipenv are already installed. See here for help.
-
Clone the repo and configure the virtual environment:
$ git clone https://github.com/omjigupta/django-social-authentication.git
$ cd django-social-authentication
$ pipenv install
$ pipenv shell
- Set up the initial migration for our custom user models in users and build the database.
(django-social-authentication) $ python manage.py makemigrations users
(django-social-authentication) $ python manage.py migrate
(django-social-authentication) $ python manage.py createsuperuser
(django-social-authentication) $ python manage.py runserver
- Set up Social application in admin section
- http://127.0.0.1:8000/admin/ click on social applications http://127.0.0.1:8000/admin/socialaccount/socialapp/
- Add social application using your github app secret key and client id.
- Endpoints
Login to github
- login - http://127.0.0.1:8000/