A simple Django API Project which can be used to authenticate users using social platforms like Google and Facebook.
Prerequisites :
- Before you can integrate Google Sign-In into your website, you must have a Google API Console project. You need to create a client ID, which will be used to call the google sign-in API.
Follow this link : https://developers.google.com/identity/sign-in/web/devconsole-project
- To implement Facebook Login, we need a Facebook App ID.
Follow this link : https://developers.facebook.com/docs/facebook-login/web
Requirements:
- Django==1.10
- djangorestframework==3.6.3
Installation :
- Download the repository.
- Create Virtual Environment for this project.
- Activate virtual environment and then install requirements.
- Type
python manage.py migrate
on terminal to load initial migrations. - Replace
{Please_use_your_clientID}
with your google client ID in index.html on line 5. - Replace
{{ Please use your Facebook APP ID}}
with your facebook App ID in social_login.js on line 85.
Now, you are good to go. Start the Django project by typing python manage.py runserver
.