Python Authentication

Open-source Python projects categorized as Authentication

Top 23 Python Authentication Projects

  • django-allauth

    Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication.

    Project mention: Django SaaS Package | /r/django | 2023-06-25

    If you don't want to use Pegasus or another paid product (presumably because of the cost), the packages I'd reach for are django-allauth for login/user stuff and dj-stripe for the Stripe integration. As for teams, there wasn't a library I was happy with so I rolled my own for Pegasus, but some people like django-tenants. It's too heavyweight for my taste as it requires a more complex dev/test/infrastructure setup with Postgres schemas, as opposed to having a single-database and handling multitenancy in the application layer. But there are pros and cons to both approaches.

  • PyJWT

    JSON Web Token implementation in Python

    Project mention: Why are developers obsessed with sessions in the backend, even in REST APIs? | /r/learnprogramming | 2023-04-19
  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • Flask-AppBuilder

    Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) -

    Project mention: Pretty simple question, could be rewarding if enough people answer. | /r/flask | 2023-06-06

    This one might be interesting as well:

  • authlib

    The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.

  • flask-login

    Flask user session management.

    Project mention: Some questions about security when using flask | /r/flask | 2023-03-28

    Are this modules good? and

  • django-oauth-toolkit

    OAuth2 goodies for the Djangonauts!

  • python-oauth2

    A fully tested, abstract interface to creating OAuth clients and servers.

  • WorkOS

    The modern API for authentication & user identity. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • flask-base

    A simple Flask boilerplate app with SQLAlchemy, Redis, User Authentication, and more.

  • python-social-auth

    Social auth made simple

  • OAuthLib

    A generic, spec-compliant, thorough implementation of the OAuth request-signing logic

  • djoser

    REST implementation of Django authentication system.

    Project mention: djoser is dead? | /r/django | 2023-03-12

    That's what I'd usually say too, but this issue does give some "neglected project" vibes - the version on pypi is still quite a bit older than what's in the repo.

  • django-rest-auth

    This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST (JSON)

    Project mention: The most popular Django API packages listed by Django.WTF | /r/django | 2023-05-31
  • Python Social Auth

    Python Social Auth - Application - Django

  • email2phonenumber

    A OSINT tool to obtain a target's phone number just by having his email address

    Project mention: FLaNK Stack Weekly for 20 Nov 2023 | | 2023-11-20
  • rauth

    A Python library for OAuth 1.0/a, 2.0, and Ofly.

  • django-two-factor-auth

    Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.

  • dj-rest-auth

    Authentication for Django Rest Framework

    Project mention: Can someone help me understand CSRF security? (context inside) | /r/django | 2023-09-25

    I am using dj-rest-auth for authentication. I am using JWT token authentication. All advice on JWT tokens is to not store them in local storage. Instead, using this package I store them in HttpOnly cookie. Now, I am apparently vulnerable to CSRF attack. So I enable JWT_AUTH_COOKIE_USE_CSRF. This checks the CSRF token on authenticated requests. However, there is still the potential vulnerability known as "login CSRF" as detailed by this issue on Github. In order to account for this, there is another setting called JWT_AUTH_COOKIE_ENFORCE_CSRF_ON_UNAUTHENTICATED. This enforces CSRF on unauthenticated views (such as login).

  • Coercer

    A python script to automatically coerce a Windows server to authenticate on an arbitrary machine through 12 methods.

  • python-jose

    A JOSE implementation in Python

  • Flask-OAuthlib


  • privacyIDEA

    :closed_lock_with_key: multi factor authentication system (2FA, MFA, OTP Server)

  • mongoaudit

    🔥 A powerful MongoDB auditing and pentesting tool 🔥

  • Digital-Forensics-Guide

    Digital Forensics Guide. Learn all about Digital Forensics, Computer Forensics, Mobile device Forensics, Network Forensics, and Database Forensics.

    Project mention: Most used DFIR tools | /r/cybersecurity | 2023-12-10

    If you're looking to learn on your own, try mikeroyal's digital forensics guide on Github. There's a lot of recommended resources there that'll speed you up.

  • Onboard AI

    ChatGPT with full context of any GitHub repo. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-12-10.

Python Authentication related posts


What are some of the best open-source Authentication projects in Python? This list will help you:

Project Stars
1 django-allauth 8,698
2 PyJWT 4,830
3 Flask-AppBuilder 4,451
4 authlib 4,165
5 flask-login 3,464
6 django-oauth-toolkit 2,988
7 python-oauth2 2,984
8 flask-base 2,949
9 python-social-auth 2,831
10 OAuthLib 2,721
11 djoser 2,434
12 django-rest-auth 2,396
13 Python Social Auth 1,927
14 email2phonenumber 1,893
15 rauth 1,605
16 django-two-factor-auth 1,553
17 dj-rest-auth 1,533
18 Coercer 1,500
19 python-jose 1,443
20 Flask-OAuthlib 1,443
21 privacyIDEA 1,419
22 mongoaudit 1,304
23 Digital-Forensics-Guide 1,276
ChatGPT with full context of any GitHub repo.
Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at