# streamlit-authenticator

**URL:** https://discuss.streamlit.io/c/streamlit-components/streamlit-authenticator/32.md

[Latest](https://discuss.streamlit.io/latest.md) · [Categories](https://discuss.streamlit.io/categories.md) · [Tags](https://discuss.streamlit.io/tags.md)

---

## [About the streamlit-authenticator category](https://discuss.streamlit.io/t/about-the-streamlit-authenticator-category/73871)

<div class="topic-metadata">

**Author:** [@Caroline](https://discuss.streamlit.io/u/Caroline)\
**Replies:** 0

</div>

---

## [Streamlit Authentication - authenticator.login('main', 'Login') always returning None](https://discuss.streamlit.io/t/streamlit-authentication-authenticator-login-main-login-always-returning-none/93130)

<div class="topic-metadata">

**Author:** [@Rahim1](https://discuss.streamlit.io/u/Rahim1)\
**Replies:** 5\
**Last updated:** [January 19, 2026, 7:59pm UTC](https://discuss.streamlit.io/t/streamlit-authentication-authenticator-login-main-login-always-returning-none/93130 "2026-01-19T19:59:23Z")

</div>

Hi, I’m new to streamlit and I’m trying to put some authentication into my app. I seem to always be getting None back in my code. I understand that it gives a None value when it first loads but for some reason even afte…

---

## [ValueError: Key not found when authenticating with Microsoft Entra ID (Single Tenant)](https://discuss.streamlit.io/t/valueerror-key-not-found-when-authenticating-with-microsoft-entra-id-single-tenant/120293)

<div class="topic-metadata">

**Author:** [@Eduardo23](https://discuss.streamlit.io/u/Eduardo23)\
**Replies:** 0\
**Last updated:** [December 10, 2025, 6:53pm UTC](https://discuss.streamlit.io/t/valueerror-key-not-found-when-authenticating-with-microsoft-entra-id-single-tenant/120293 "2025-12-10T18:53:03Z")

</div>

Bug Report Summary I’m getting a ValueError: Key not found error when implementing Microsoft Entra ID authentication following the official Streamlit documentation. The error occurs during the OAuth callback when Streaml…

---

## [Expose OAuth access-token in the new st.login() / st.user flow for backend API calls](https://discuss.streamlit.io/t/expose-oauth-access-token-in-the-new-st-login-st-user-flow-for-backend-api-calls/114738)

<div class="topic-metadata">

**Author:** [@Don7](https://discuss.streamlit.io/u/Don7)\
**Replies:** 2\
**Last updated:** [December 8, 2025, 10:20am UTC](https://discuss.streamlit.io/t/expose-oauth-access-token-in-the-new-st-login-st-user-flow-for-backend-api-calls/114738 "2025-12-08T10:20:26Z")

</div>

Hi :waving\_hand: I’m moving an existing Streamlit app over to the shiny new built-in auth (st.login(), st.logout(), st.user) and have hit a blocker: there is currently no supported way to retrieve the OAuth access-token…

---

## [Unable to install and import some dependencies on streamlit community web server.](https://discuss.streamlit.io/t/unable-to-install-and-import-some-dependencies-on-streamlit-community-web-server/120011)

<div class="topic-metadata">

**Author:** [@Himanshu24](https://discuss.streamlit.io/u/Himanshu24)\
**Replies:** 0\
**Last updated:** [November 7, 2025, 8:44pm UTC](https://discuss.streamlit.io/t/unable-to-install-and-import-some-dependencies-on-streamlit-community-web-server/120011 "2025-11-07T20:44:53Z")

</div>

While deploying it is not able to install and import some of the dependencies on streamlit community web app server. The libraries are : streamlit email-validator mysql-connector-python bcrypt audiorecorder pydub s…

---

## [The session state is not saved when switching between pages with Streamlit-Authenticator](https://discuss.streamlit.io/t/the-session-state-is-not-saved-when-switching-between-pages-with-streamlit-authenticator/119201)

<div class="topic-metadata">

**Author:** [@niyazka90](https://discuss.streamlit.io/u/niyazka90)\
**Replies:** 0\
**Last updated:** [August 26, 2025, 10:40pm UTC](https://discuss.streamlit.io/t/the-session-state-is-not-saved-when-switching-between-pages-with-streamlit-authenticator/119201 "2025-08-26T22:40:03Z")

</div>

I have created a multi-page application in Streamlit and use Streamlit-Authenticator. When navigating between pages, the session\_state created in the pages is reset to zero. Why is this happening?

---

## [issues with streamlit-authenticator ](https://discuss.streamlit.io/t/issues-with-streamlit-authenticator/118222)

<div class="topic-metadata">

**Author:** [@krishna\_chaitanya](https://discuss.streamlit.io/u/krishna_chaitanya)\
**Replies:** 1\
**Last updated:** [August 4, 2025, 6:59am UTC](https://discuss.streamlit.io/t/issues-with-streamlit-authenticator/118222 "2025-08-04T06:59:36Z")

</div>

I followed below link to create a login page for my streamlit application. but i am getting below error all the time. can someone help please. HAve been struggling like anything. i m using 0.4.2 version of streamlit-a…

---

## [Two factor authentication on user register](https://discuss.streamlit.io/t/two-factor-authentication-on-user-register/113189)

<div class="topic-metadata">

**Author:** [@Luka3](https://discuss.streamlit.io/u/Luka3)\
**Replies:** 0\
**Last updated:** [May 21, 2025, 10:05pm UTC](https://discuss.streamlit.io/t/two-factor-authentication-on-user-register/113189 "2025-05-21T22:05:41Z")

</div>

Hi, When using two factor authentication in the register user component, is there a way to only send the verification code after the input is validated? Currently when for example the passwords don’t match, it will firs…

---

## [Creating Condition role-based access](https://discuss.streamlit.io/t/creating-condition-role-based-access/108258)

<div class="topic-metadata">

**Author:** [@Kuhu](https://discuss.streamlit.io/u/Kuhu)\
**Replies:** 0\
**Last updated:** [April 13, 2025, 7:58pm UTC](https://discuss.streamlit.io/t/creating-condition-role-based-access/108258 "2025-04-13T19:58:43Z")

</div>

import streamlit as st from firestore\_utils import \* import os from AdminPages import \* st.set\_page\_config(page\_title="Placement Tracker", layout="centered", # or "centered" initial\_sidebar\_state…

---

## [I want to create a MOM action points based on the attached voice recording](https://discuss.streamlit.io/t/i-want-to-create-a-mom-action-points-based-on-the-attached-voice-recording/95321)

<div class="topic-metadata">

**Author:** [@Tanvi](https://discuss.streamlit.io/u/Tanvi)\
**Replies:** 0\
**Last updated:** [March 20, 2025, 6:51am UTC](https://discuss.streamlit.io/t/i-want-to-create-a-mom-action-points-based-on-the-attached-voice-recording/95321 "2025-03-20T06:51:50Z")

</div>

https://vconnecterp-my.sharepoint.com/:u:/r/personal/tanvi\_redij\_hubblehox\_com/Documents/Microsoft%20Teams%20Chat%20Files/exam%20platform%20.m4a?csf=1&web=1&e=qnlkO1

---

## [Can someone heolp fix my code with the transition from login to main page please](https://discuss.streamlit.io/t/can-someone-heolp-fix-my-code-with-the-transition-from-login-to-main-page-please/94534)

<div class="topic-metadata">

**Author:** [@dratkins9](https://discuss.streamlit.io/u/dratkins9)\
**Replies:** 1\
**Last updated:** [March 12, 2025, 12:20am UTC](https://discuss.streamlit.io/t/can-someone-heolp-fix-my-code-with-the-transition-from-login-to-main-page-please/94534 "2025-03-12T00:20:58Z")

</div>

I was able to access my csv input main page to check for fraud using machine learning. Then I tried to implement a login authentication which is working. After I attempt to login, the screen stays on the login and doesn’…

---

## [Streamlit\_authenticator is not working as expected for login](https://discuss.streamlit.io/t/streamlit-authenticator-is-not-working-as-expected-for-login/87735)

<div class="topic-metadata">

**Author:** [@Gopinathan](https://discuss.streamlit.io/u/Gopinathan)\
**Replies:** 0\
**Last updated:** [December 16, 2024, 5:05am UTC](https://discuss.streamlit.io/t/streamlit-authenticator-is-not-working-as-expected-for-login/87735 "2024-12-16T05:05:11Z")

</div>

My streamlit Version: 1.41.1 & streamlit-authenticator Version: 0.4.1 Code: import streamlit as st import yaml import streamlit\_authenticator as stauth from yaml.loader import SafeLoader import bcrypt Load config…

---

## [Streamlit-authenticator - Login with Google (not working)](https://discuss.streamlit.io/t/streamlit-authenticator-login-with-google-not-working/87747)

<div class="topic-metadata">

**Author:** [@Ofri](https://discuss.streamlit.io/u/Ofri)\
**Replies:** 0\
**Last updated:** [December 16, 2024, 10:25am UTC](https://discuss.streamlit.io/t/streamlit-authenticator-login-with-google-not-working/87747 "2024-12-16T10:25:59Z")

</div>

Hey:) So I have been trying for the past few weeks to implement login with google to my streamlit app (a request from my company) AND IT HAS BEEN TERRIBLE. I am now trying to implement the new feature of guest login fr…

---

## [How secure is Streamlit-authenticator](https://discuss.streamlit.io/t/how-secure-is-streamlit-authenticator/87249)

<div class="topic-metadata">

**Author:** [@Mark14](https://discuss.streamlit.io/u/Mark14)\
**Replies:** 2\
**Last updated:** [December 7, 2024, 9:07pm UTC](https://discuss.streamlit.io/t/how-secure-is-streamlit-authenticator/87249 "2024-12-07T21:07:03Z")

</div>

Hi I have a client with confidential data, they wish me to implement a cloud-hosted web app with a Streamlit-implemented user interface. Obviously I will encrypt their data at rest, but I’m wondering about how secure S…

---

## [Deploying Streamlit-Authenticator via Streamlit Community Cloud](https://discuss.streamlit.io/t/deploying-streamlit-authenticator-via-streamlit-community-cloud/39085)

<div class="topic-metadata">

**Author:** [@C\_Quang](https://discuss.streamlit.io/u/C_Quang)\
**Replies:** 14\
**Last updated:** [November 14, 2024, 6:28am UTC](https://discuss.streamlit.io/t/deploying-streamlit-authenticator-via-streamlit-community-cloud/39085 "2024-11-14T06:28:51Z")

</div>

Hi @mkhorasani, Firstly your component is a great contribution to the Streamlit community and I have enjoyed reading your (recently purchased!) book. I have been able to successfully get your Streamlit-Authenticator ap…

---

## [Type object 'Hasher' has no attribute 'passwords'](https://discuss.streamlit.io/t/type-object-hasher-has-no-attribute-passwords/84077)

<div class="topic-metadata">

**Author:** [@zetter.vitrolic](https://discuss.streamlit.io/u/zetter.vitrolic)\
**Replies:** 4\
**Last updated:** [October 26, 2024, 10:25am UTC](https://discuss.streamlit.io/t/type-object-hasher-has-no-attribute-passwords/84077 "2024-10-26T10:25:47Z")

</div>

Hi guys. I’m trying to make authenticating for my streamlit app. Everything works fine for local my local machine and i’ve deployed my app to Streamlit Cloud. Here starts difficulties. I don’t want to store some info l…

---

## [After installing streamlit\_authenticator and logging in, sidebar menu desappears when reloading browser, other components remain](https://discuss.streamlit.io/t/after-installing-streamlit-authenticator-and-logging-in-sidebar-menu-desappears-when-reloading-browser-other-components-remain/65304)

<div class="topic-metadata">

**Author:** [@eurojourney](https://discuss.streamlit.io/u/eurojourney)\
**Replies:** 16\
**Last updated:** [September 14, 2024, 2:36am UTC](https://discuss.streamlit.io/t/after-installing-streamlit-authenticator-and-logging-in-sidebar-menu-desappears-when-reloading-browser-other-components-remain/65304 "2024-09-14T02:36:49Z")

</div>

Hello! I installed Streamlit-Authenticator and everything works as intended. However, when I reload the browser, the streamlit-option-menu on my sidebar disappears. It seems to only affect the streamlit-option-menu comp…

---

## [New Component: Streamlit-Authenticator, a secure authenticaton module to validate user credentials in a Streamlit application](https://discuss.streamlit.io/t/new-component-streamlit-authenticator-a-secure-authenticaton-module-to-validate-user-credentials-in-a-streamlit-application/18893)

<div class="topic-metadata">

**Author:** [@mkhorasani](https://discuss.streamlit.io/u/mkhorasani)\
**Replies:** 138\
**Last updated:** [September 6, 2024, 4:36pm UTC](https://discuss.streamlit.io/t/new-component-streamlit-authenticator-a-secure-authenticaton-module-to-validate-user-credentials-in-a-streamlit-application/18893 "2024-09-06T16:36:58Z")

</div>

Streamlit-Authenticator A secure authentication module to validate user credentials in a Streamlit application. Installation Streamlit-Authenticator is distributed via PyPI: pip install streamlit-authenticator Example …

---

## [Streamlit-authenticator module serving blank page after login](https://discuss.streamlit.io/t/streamlit-authenticator-module-serving-blank-page-after-login/64870)

<div class="topic-metadata">

**Author:** [@lechiffre](https://discuss.streamlit.io/u/lechiffre)\
**Replies:** 3\
**Last updated:** [July 26, 2024, 3:37pm UTC](https://discuss.streamlit.io/t/streamlit-authenticator-module-serving-blank-page-after-login/64870 "2024-07-26T15:37:26Z")

</div>

I am getting a blank page after successful login using the streamlit-authenticator. If I reload the page, the blank page no longer shows and page displays correctly with all the data. This only happens in the docker inst…

---

## [Streamlit-Authenticator - How to access additional user field in yaml after validation?](https://discuss.streamlit.io/t/streamlit-authenticator-how-to-access-additional-user-field-in-yaml-after-validation/73789)

<div class="topic-metadata">

**Author:** [@Ninad](https://discuss.streamlit.io/u/Ninad)\
**Replies:** 3\
**Last updated:** [July 6, 2024, 8:18pm UTC](https://discuss.streamlit.io/t/streamlit-authenticator-how-to-access-additional-user-field-in-yaml-after-validation/73789 "2024-07-06T20:18:47Z")

</div>

Hello, I’m referring to the following Streamlit-Authenticator authenticator. In the config.yaml I have added a new field called “Organization” – How can I access the “Organization” field after successful authentication? …

---

## [Little flicker after login in streamlit-authenticator component](https://discuss.streamlit.io/t/little-flicker-after-login-in-streamlit-authenticator-component/66317)

<div class="topic-metadata">

**Author:** [@thisisbhupendrasingh](https://discuss.streamlit.io/u/thisisbhupendrasingh)\
**Replies:** 0\
**Last updated:** [April 5, 2024, 7:29am UTC](https://discuss.streamlit.io/t/little-flicker-after-login-in-streamlit-authenticator-component/66317 "2024-04-05T07:29:10Z")

</div>

Please help me to identify the issue behind this little flicker as I login? I followed instructions from this Docs page to create login page. import streamlit as st import streamlit\_authenticator as stauth import yaml …

---

## [Streamlit-authenticator](https://discuss.streamlit.io/t/streamlit-authenticator/65844)

<div class="topic-metadata">

**Author:** [@akhil\_vk18](https://discuss.streamlit.io/u/akhil_vk18)\
**Replies:** 1\
**Last updated:** [March 30, 2024, 2:20pm UTC](https://discuss.streamlit.io/t/streamlit-authenticator/65844 "2024-03-30T14:20:15Z")

</div>

While using hasher error has occurred saying streamlit-authenticator module has no attribute ‘hasher’ how to solve this .

---

## [Streamlit-Authenticator - keyError on logout](https://discuss.streamlit.io/t/streamlit-authenticator-keyerror-on-logout/65568)

<div class="topic-metadata">

**Author:** [@Oleg\_Saushkin](https://discuss.streamlit.io/u/Oleg_Saushkin)\
**Replies:** 10\
**Last updated:** [March 27, 2024, 11:48am UTC](https://discuss.streamlit.io/t/streamlit-authenticator-keyerror-on-logout/65568 "2024-03-27T11:48:33Z")

</div>

I implemented auth support for the streamlit app based on the example - Streamlit-Authenticator, Part 1: Adding an authentication component to your app (exactly how it is. and it is working … untill I decided to open tw…

---

## [Streamlit Authenticator: Logout - Are you sure message?](https://discuss.streamlit.io/t/streamlit-authenticator-logout-are-you-sure-message/64125)

<div class="topic-metadata">

**Author:** [@Sarnath\_K](https://discuss.streamlit.io/u/Sarnath_K)\
**Replies:** 1\
**Last updated:** [March 7, 2024, 11:52pm UTC](https://discuss.streamlit.io/t/streamlit-authenticator-logout-are-you-sure-message/64125 "2024-03-07T23:52:26Z")

</div>

I am using “streamlit\_authenticator” package to display login screen for my app. It’s a nice piece of work. Thank you Mohammad Khorasani! I need a little control over my “logout” button. I want to ask the user “Are you …

---

## [Streamlit\_authenticator Module not found](https://discuss.streamlit.io/t/streamlit-authenticator-module-not-found/62058)

<div class="topic-metadata">

**Author:** [@Thoufeeqai](https://discuss.streamlit.io/u/Thoufeeqai)\
**Replies:** 2\
**Last updated:** [February 10, 2024, 9:29pm UTC](https://discuss.streamlit.io/t/streamlit-authenticator-module-not-found/62058 "2024-02-10T21:29:49Z")

</div>

I am getting following error when running locally or streamlit cloud. The error is below: ile "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script\_runner.py", line 535, in \_run\_script…

---

## [Streamlit-authenticator causing st.write text to double](https://discuss.streamlit.io/t/streamlit-authenticator-causing-st-write-text-to-double/60143)

<div class="topic-metadata">

**Author:** [@robb](https://discuss.streamlit.io/u/robb)\
**Replies:** 4\
**Last updated:** [January 22, 2024, 12:24pm UTC](https://discuss.streamlit.io/t/streamlit-authenticator-causing-st-write-text-to-double/60143 "2024-01-22T12:24:06Z")

</div>

When app waiting to load I have doubled (greyed) parts with st.write and st.expander. It is caused by “streamlit\_authenticator” Are you running your app locally or is it deployed? locally and deployed If your app is …

---

## [Can't import streamlit-authenticator properly](https://discuss.streamlit.io/t/cant-import-streamlit-authenticator-properly/60006)

<div class="topic-metadata">

**Author:** [@Achim\_Struve](https://discuss.streamlit.io/u/Achim_Struve)\
**Replies:** 1\
**Last updated:** [January 18, 2024, 3:16pm UTC](https://discuss.streamlit.io/t/cant-import-streamlit-authenticator-properly/60006 "2024-01-18T15:16:49Z")

</div>

I created a clean new environment and just installed streamlit-authenticator via pip. The installation worked fine without any errors. However, as soon as I import streamlit\_authenticator into my .py file, I get the fol…

---

## [Streamlit-Authenticator is not working](https://discuss.streamlit.io/t/streamlit-authenticator-is-not-working/28383)

<div class="topic-metadata">

**Author:** [@nou7lh](https://discuss.streamlit.io/u/nou7lh)\
**Replies:** 4\
**Last updated:** [December 4, 2023, 4:55pm UTC](https://discuss.streamlit.io/t/streamlit-authenticator-is-not-working/28383 "2023-12-04T16:55:30Z")

</div>

I’m building a basic streamlit app. In order to validate user credentials, I’m using the authentification module of streamlit. Only one problem, the code does not work ! ERROR TypeError: Authenticate.init() got multipl…

---

## [Logout button using streamlit-authenticator with multipages](https://discuss.streamlit.io/t/logout-button-using-streamlit-authenticator-with-multipages/54677)

<div class="topic-metadata">

**Author:** [@Leandro\_Alves](https://discuss.streamlit.io/u/Leandro_Alves)\
**Replies:** 0\
**Last updated:** [November 3, 2023, 1:05pm UTC](https://discuss.streamlit.io/t/logout-button-using-streamlit-authenticator-with-multipages/54677 "2023-11-03T13:05:14Z")

</div>

Hi guys, I’ve created an app with streamlit-authenticator. It’s works well but the button to logout after login is just appearing in my Home.py (on sidebar), the same point where login lines was wrote. I would like to pu…

---

## [Invalidate streamlit-authenticator JWT upon logout](https://discuss.streamlit.io/t/invalidate-streamlit-authenticator-jwt-upon-logout/51919)

<div class="topic-metadata">

**Author:** [@espogian](https://discuss.streamlit.io/u/espogian)\
**Replies:** 0\
**Last updated:** [September 21, 2023, 7:29am UTC](https://discuss.streamlit.io/t/invalidate-streamlit-authenticator-jwt-upon-logout/51919 "2023-09-21T07:29:59Z")

</div>

Hi, I’m using streamlit==1.26.0 and streamlit\_authenticator==0.2.3. I’ve noticed that the JWT which saved upon login (as a cookie, which in the default config is called “random\_cookie\_name”) retains its validity even i…

[Next page](https://discuss.streamlit.io/c/streamlit-components/streamlit-authenticator/32.md?page=1)
