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.experimental_user
returns information about a logged-in user.
if st.experimental_user.is_logged_in:
st.write(f"Welcome back, {st.experimental_user.name}!")
Still have questions?
Our forums are full of helpful information and Streamlit experts.