Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authentication app for Django [closed]

What is the best authentication app for Django that:

  • has configurable required fields, for example allows using email as username
  • integrates with other authentication APIs, such as Facebook, Twitter, Google
  • password recovery flow is configurable, sends temporary password vs. recovery link
  • preferably has invitation system, so the registration process can be controlled

I don't think there is any that has all these features, so I'm looking for one that covers as much as possible. But these are features that almost any well design web service should have. So I don't want to reinvent the wheel.

like image 238
grigy Avatar asked Jan 25 '12 18:01

grigy


People also ask

What is default authentication in Django?

Authentication Views Django provides several views that you can use for handling login, logout, and password management. These make use of the stock auth forms but you can pass in your own forms as well. Django provides no default template for the authentication views.

Is Django default authentication secure?

SQL injection protection — Django uses built-in ORM, thus there is no risk of SQL injection (raw queries are possible, but by no means something that a beginner would need to use).


Video Answer


2 Answers

There isn't one django package that will cover everything, instead there are numerous great projects that tackle each of the requirements you mention:

  • general auth : django-auth - this is a part of the django distribution but needs to be eneabled
  • social authentication : django-social-auth - integrates social authentication with the default django-auth flow
  • registration and passwords : django-registration - adds the registration flow, including sign up and email confirmation etc.
  • invitation system : django-invitation - allows registration to be limited to invitations
  • profiles : django-profiles - allows you to extend the users account with a profile

You could also have a look at django-userena which is a new hosted solution to user management for your django app. I haven't looked into how it works or how comprehensive it is, but it looks promising.

Finally, have a look at django packages for other authentication apps:

http://djangopackages.com/grids/g/authentication/

EDIT:

This post is a little outdated

  • django-social-auth has become python-social-auth
  • django-allauth: There is another good all-in-one auth app called django-allauth. I haven't used it extensively but I believe it takes care of auth, social-auth, registration and profiles in one app
  • Configurable User Models: Django 1.5 introduced a configuratble User models in the auth module so you can now edit what fields you want to make use of for your user (email only, no username etc.). This is also useful if you want to add profile-like information to your user without having to join with another table (like you would with django-profiles or a OneToOne relationship with a custom profile model)
like image 124
Timmy O'Mahony Avatar answered Sep 30 '22 00:09

Timmy O'Mahony


Here is nice and official comparison for only Facebook Authentication Packages

Facebook Authentication

like image 30
damienix Avatar answered Sep 30 '22 00:09

damienix