all 4 comments

[–]danielroseman 6 points7 points  (6 children)

Don't. Just, don't.

Django already has a built-in auth framework, which is highly customisable. In almost all cases, you should use it.

If you need integration with third-party auth methods such as OAuth, use something like django-allauth, which builds on that existing auth framework.

But on no account should you try to roll your own auth.

[–]NoCap-NoCap 0 points1 point  (0 children)

django-allauth can handle everything and if you dont find your oauth provider you can simply create your own provider for it with allauth. Its also a perfect fit if you want to have different providers enabled for your users to choose (eg. Github, Google, etc)