This is a template that shows how to implement google social OAuth2 with Djoser library (REST implementation of Django Authentication)
For advanced users:
virtualenv venv_social_djoser_template
cd venv_social_djoser_template
git clone https://github.com/hvitis/social_djoser_template
cd social_djoser_template
pip install -r requirements.txt
- Get OAuth2 keys
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = 'YOUR_SOCIAL_AUTH_GOOGLE_OAUTH2_KEY'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'YOUR_SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET'
- Set up your OAuth2 redirect URLs in google developers console
- Run the app
python manage.py migrate
python manage.py runserver
- Full newbie explanation on how to connect OAuth2 with django (using django_social) in this template.
- Check POSTMAN tests in this repo to see how the requests work.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.