skillfed

streamlit-authenticator

A secure authentication module to manage user access in a Streamlit application.

streamlit-authenticator v0.4.2 252.7K downloads/30d#8,539 on PyPI2,086
Permissive license Active released

What it is and what it does

Streamlit-Authenticator is a Python module that adds secure user authentication to Streamlit web applications. It manages credentials through a configuration file, handles password hashing with bcrypt, and provides widgets for login, registration, password reset, and account management. The package integrates with Streamlit's session state to maintain authentication across page reloads and supports optional OAuth2 authentication via Google and Microsoft.

The module depends on bcrypt for password hashing, cryptography for secure token handling, PyJWT for token generation, PyYAML for configuration parsing, and extra-streamlit-components for UI elements. It also includes optional captcha support and can send authentication codes via email when configured with an API key. The package is designed for developers building multi-user Streamlit applications who need standard authentication flows without building security infrastructure from scratch.

Use it for:

  • Protect a Streamlit dashboard with username/password login to restrict access to authorized users only
  • Allow new users to self-register through a registration widget while restricting signups to pre-authorized email addresses
  • Implement password reset and account recovery flows for users who forget their credentials
  • Add two-factor authentication via email for applications handling sensitive data or operations
  • Enable single sign-on through Google or Microsoft OAuth2 for enterprise Streamlit deployments
  • Manage user roles and permissions to control which features different users can access within the app

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds user authentication and access control to Streamlit applications, supporting login, registration, password reset, two-factor authentication, and OAuth2 integration.

Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a common need for Streamlit developers. The permissive MIT license removes licensing concerns. Install it if you're building a multi-user Streamlit app that requires authentication; the alternative is implementing security infrastructure yourself.

Install

streamlit-authenticator on PyPI

pip

pip install streamlit-authenticator

uv

uv add streamlit-authenticator

poetry

poetry add streamlit-authenticator

Installing streamlit-authenticator

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained with recent commits and 2086 repository stars, indicating solid community adoption and ongoing support.

License in practice

Licensed under MIT (permissive), allowing free use, modification, and distribution in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install streamlit-authenticator

import streamlit as st
import streamlit_authenticator as stauth

authenticator = stauth.Authenticate(
    config['credentials'],
    config['cookie']['name'],
    config['cookie']['key'],
    config['cookie']['expiry_days']
)

authenticator.login()

Requires a configuration file with user credentials, cookie settings, and optional OAuth2 parameters; plain-text passwords are hashed automatically on first run.

Verify before relying

  • Whether the package handles session state persistence correctly across Streamlit reruns in all deployment scenarios
  • Performance characteristics when managing large numbers of concurrent users
  • Specifics of the optional API key requirement for email-based password reset and two-factor authentication features

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 7 — bcrypt, captcha, cryptography, extra-streamlit-components, PyJWT, PyYAML, streamlit
Maintenance actively maintained — 531 days since the last release
Last repo commit
First released
Downloads 252,671/month — #8,539 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: streamlit_authenticator-0.4.2-py3-none-any.whl

Keywords: Python, Streamlit, Authentication, Components

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

streamlit user authenticationstreamlit login widgetstreamlit access controlstreamlit user managementstreamlit password resetstreamlit two factor authenticationstreamlit oauth2
authenticationstreamlituser-management

More Security packages