32👍
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 aOneToOne
relationship with a custom profile model)
2👍
Here is nice and official comparison for only Facebook Authentication Packages
- Is there such a thing for Django as there is Heroku for Ruby on Rails
- How to specify uniqueness for a tuple of field in a Django model
- Separating Django App Views
1👍
Go for django allauth. it Covers all authentication flows, Custom user model. and over 50+ social authentication providers. We are using it from a long time and it has evolved a lot over the time.
- Django Rest Framework using dot in url
- Moving from direct_to_template to new TemplateView in Django
- Django create new user without password
0👍
First you have to install social-auth-app-django:
pip install social-auth-app-django
Then add it into your INSTALLED_APPS (in settings) then you have to create API keys, using the steps below for the networks you want to enable:
- Google
- Create a project on Google Cloud Platform
- Facebook
- Log into Facebook developers and create API keys
After creating project you will get the App ID and App Secret (don’t share it with any one) then add these ID & Secret in setting and provide a redirec valid url for more info
- Acessing POST field data without a form (REST api) using Django
- Default value for foreign key in Django migrations.AddField
- Django Pandas to http response (download file)