This is a simple web application where users can sign in with their social accounts like Google, Facebook, GitHub.
https://django-allauth.readthedocs.io/en/latest/
The below OAuth2 providers are used in this application
- GitHub
Clone the project
git clone https://github.com/Shivakumar1V/Social-Account-Signin-Using-Django-allauth
Install dependencies
pip install -r requirements.txt
Create a superuser with the below command
python manage.py createsuperuser
Start the server
python manage.py runserver
- It will run the application on localhost:8000
Get your Client id
and Secret key
by registering app on the providers website by following the below docs
- Google: https://django-allauth.readthedocs.io/en/latest/providers.html#google
- Facebook: https://django-allauth.readthedocs.io/en/latest/providers.html#facebook
- GitHub: https://django-allauth.readthedocs.io/en/latest/providers.html#github
Note: Usehttp://localhost:8000
as domain name while registering app as this project running onhttp://localhost:8000
For adding Social Application follow the below steps
- Open the browser and visit http://localhost:8000/admin/socialaccount/socialapp/add/
- Login with
admin
Username and Password - Select Provider, type provider name in the Name section, enter your Client id and Secret key, add localhost:8000 to Chosen sites and click on save - continue this with all providers(Google, Facebook, GitHub)
Yeah! Now the application is ready to use
Go to http://localhost:8000 and enjoy the application