I'm slightly new to Django, and I've never had a fun time doing user management in web dev. Is there a nice, basic example/tutorial on authentication the Django User model with Oauth such as Twitter? Can I use the current User model and the data in it, or do I have to create a new table and migrate the current users over?
I tried searching around Google and such, and though I slightly see where alot of the django-social and oauth plugins go with things, I can't figure out how they're storing tokens and if they're extended to the User model.
In short, I just need a basic example and plain-English description on how to implement Oauth (or any login API) with the built-in Django User model.
Thanks!
You can integrate Google OAuth into your Django application with Django OAuth packages like django-allauth . You can also integrate other OAuth services similarly using django-allauth .
For Django's default user model, the user identifier is the username, for custom user models it is the field specified by USERNAME_FIELD (see Customizing Users and authentication). It also handles the default permissions model as defined for User and PermissionsMixin .
You should try python-social-auth (the old deprecated version being Django Social auth).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With