Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django User Model Oauth

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!

like image 583
dgreichert Avatar asked Nov 22 '11 05:11

dgreichert


People also ask

Does Django support OAuth?

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 .

What is Django user model?

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 .


1 Answers

You should try python-social-auth (the old deprecated version being Django Social auth).

like image 147
Frutik Avatar answered Oct 06 '22 21:10

Frutik