mkhorasani / Streamlit-Authenticator

A secure authentication module to validate user credentials in a Streamlit application.
Apache License 2.0
1.37k stars 229 forks source link

How do I execute logout button logic? #172

Closed moruga123 closed 3 weeks ago

moruga123 commented 3 weeks ago

If authentication_status is True, I display a logout button.

If I log out, the logout button python variable will not be defined because authentication_status is False upon rerunning the script. Therefore, I can't implement any logout logic.

I need access to the username that just logged out, to do the logout logic as well.

mkhorasani commented 3 weeks ago

Hi @moruga123, in the next release of Streamlit-Authenticator, a callback argument will be included with every widget including the logout button so that developers can implement any additional logic on top of the logic of the package itself. Please stay tuned!