/social-djoser-template

🙋‍♂️ 🙋 Use the best REST library with OAuth2 Social login. The simpliest DRF & JWT repo that allows you to extend your extended User model with REST and social logins. 🙋‍♂️ 🙋

Primary LanguagePython

social-djoser-template 🙋‍♂️ 🙋

This is a template that shows how to implement google social OAuth2 with Djoser library (REST implementation of Django Authentication)

Installation

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 

Usage

  1. 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' 
  1. Set up your OAuth2 redirect URLs in google developers console
  2. Run the app
python manage.py migrate
python manage.py runserver

Need Help ? 💁🏻‍♂️💁🏽‍♀️

  1. Full newbie explanation on how to connect OAuth2 with django (using django_social) in this template.
  2. Check POSTMAN tests in this repo to see how the requests work.

Contributing

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.

License

MIT