Documentation

search

Search

  • rocket_launch

    Get started

    • Installation
      add
    • Fundamentals
      add
    • First steps
      add
  • code

    Develop

    • Concepts
      add
    • API reference
      remove
      • PAGE ELEMENTS
      • Write and magic
        add
      • Text elements
        add
      • Data elements
        add
      • Chart elements
        add
      • Input widgets
        add
      • Media elements
        add
      • Layouts and containers
        add
      • Chat elements
        add
      • Status elements
        add
      • Third-party componentsopen_in_new
      • APPLICATION LOGIC
      • Authentication and user info
        remove
        • st.login
        • st.logout
        • st.user
      • Navigation and pages
        add
      • Execution flow
        add
      • Caching and state
        add
      • Connections and secrets
        add
      • Custom components
        add
      • Configuration
        add
      • TOOLS
      • App testing
        add
      • Command line
        add
    • Tutorials
      add
    • Quick reference
      add
  • web_asset

    Deploy

    • Concepts
      add
    • Streamlit Community Cloud
      add
    • Snowflake
    • Other platforms
      add
  • school

    Knowledge base

    • FAQ
    • Installing dependencies
    • Deployment issues
  • Home/
  • Develop/
  • API reference/
  • Authentication and user info

Authentication and user info

Streamlit provides native support for user authentication so you can personalize your apps. You can also directly read headers and cookies.

Log in a user

st.login() starts an authentication flow with an identity provider.

st.login()

Log out a user

st.logout() removes a user's identity information.

st.logout()

User info

st.user returns information about a logged-in user.

if st.user.is_logged_in: st.write(f"Welcome back, {st.user.name}!")
arrow_backPrevious: Third-party componentsarrow_forwardNext: st.login
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.


HomeContact UsCommunity
© 2025 Snowflake Inc.