openedx / openedx/openedx-platform
[Discovery] Evaluate pros/cons of switching to django-allauth
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
edx-platform currently uses Python Social Auth to allow users to authenticate via Facebook, Twitter, Apple ID, etc. It works, but we frequently hit bugs and corner cases in this code that trigger support incidents, and there have been many times where upgrades have been difficult or introduced regressions. There's actually a more popular solution for this functionality, django-allauth, which may be worth considering a migration to. Some factors in favor of switching:
- django-allauth is far more popular than Python Social Auth: 4x the GitHub stars, 6x the user count on Django Packages, 8x as many forks of the repository, 5x the number of GitHub repos using it, etc. https://djangopackages.org/grids/g/authentication/ includes these and other relevant stats. And because Python Social Auth supports several different web frameworks, django-allauth is even more dominant when only counting Django projects.
- django-allauth is maintained by a Dutch software company which offers commercial support.
- Python Social Auth has a banner and open issue begging for new maintainers and openly admitting that the project has stagnated.
- Both projects have a bus factor problem (one dominant contributor), but django-allauth still has its original primary contributor; the original Python Social Auth maintainer has moved on and handed the project over to a significantly less active maintainer.
Some factors against switching:
- There's no clear migration path, although we could potentially hire the django-allauth maintainer to prepare one for us.
- It's hard to determine if we'd actually encounter fewer problems with the new choice moving forward. We might even encounter new issues that we don't suffer with our current framework.
- We're not sure we even want to be maintaining our own full-featured authentication stack; we may be better off choosing a separate open source authentication service like the ones mentioned in https://discuss.openedx.org/t/the-future-of-open-edx-authentication/10013 .
There's no pressing need to accelerate a switch right now, but this ticket can serve as a place to capture notes on incidents that make us want to more seriously consider it. If there are no such incidents after a year or so, we may just want to close this and stick with what we have.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Python Social Auth and django-allauth documentation, the linked authentication discussion, and the migration concerns recorded in this issue. Done would mean a documented comparison and a clear recommendation about whether to migrate, retain the current stack, or investigate an external authentication service.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- django, python
- Domain
- authentication, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100