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

Confirm logout message #142

Closed skannan-maf closed 3 months ago

skannan-maf commented 3 months ago

Originally here: https://discuss.streamlit.io/t/streamlit-authenticator-logout-are-you-sure-message/64125

My requirement is to ensure there is a confirmation message shown before the actual logout? How can I do this?

mkhorasani commented 3 months ago

Hi @skannan-maf, thank you for reaching out. You can implement your own customized logout mechanism by using Streamlit-Authenticator's renderless logout capability as shown here in the readme. By passing the parameter location='unrendered' to the logout function, you can logout without showing the logout widget and instead develop your own logout form to interface with the logic. Hope this helps!

skannan-maf commented 3 months ago

Vow! Thats a great design! Thanks a lot!

skannan-maf commented 3 months ago

@mkhorasani Thanks for your solution. I have also updated the streamlit thread. Thanks again!

mkhorasani commented 3 months ago

Thank you!