Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hvitis/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. 🙋♂️ 🙋
https://github.com/hvitis/social-djoser-template
django django-rest-framework django-social django-social-network drf social-login social-network
Last synced: 28 days ago
JSON representation
🙋♂️ 🙋 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. 🙋♂️ 🙋
- Host: GitHub
- URL: https://github.com/hvitis/social-djoser-template
- Owner: hvitis
- Created: 2020-07-24T19:29:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:14:58.000Z (almost 2 years ago)
- Last Synced: 2024-10-03T07:58:26.692Z (about 1 month ago)
- Topics: django, django-rest-framework, django-social, django-social-network, drf, social-login, social-network
- Language: Python
- Homepage:
- Size: 52.7 KB
- Stars: 13
- Watchers: 2
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# social-djoser-template 🙋♂️ 🙋
This is a template that shows how to implement google social OAuth2 with [Djoser library][1] (REST implementation of Django Authentication)
## Installation
For advanced users:
```bash
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'
```2. Set up your OAuth2 redirect URLs in [google developers console][2]
3. Run the app
```bash
python manage.py migrate
python manage.py runserver
```## Need Help ? 💁🏻♂️💁🏽♀️
1. [__Full newbie explanation__][0] 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](https://choosealicense.com/licenses/mit/)[0]: https://hvitis.com/django-oauth-social-tutorial-how-to-implement-google-login-with-djoser
[1]: https://djoser.readthedocs.io/en/latest/social_endpoints.html
[2]: https://console.developers.google.com/