How can I authorise a user?

From streamlit we want to connect to our backend server and then depending on user type want to hide/show certain components!

Now as this runs on server certainly there will be a problem (it will only try and keep state of the latest request), do we have any solution to achieve this?

Basically, I’m looking for a way through which I can store states of different users on streamlit server and can basically serve different users with different layout.

Hi @Rajesh_Darak,

Thank you for sharing with the Streamlit community!

Our team is working on a feature to access a user object, but it will not be available until potentially Q3 or Q4 of this year. As a workaround, some Streamlit users show a selectbox with all usernames, allow end-users to select their username, and load user-specific content accordingly; however, this solution is not ideal if the data is sensitive.

If you’re using Streamlit Sharing you can implement secret management.

Viewer authentication is a feature we support through Streamlit for Teams. If your organization is interested in using Streamlit for Teams, you can sign up for our beta here.

You might also find this thread helpful.

Best,

Caroline

Thanks for your reply @Caroline will check your solutions out other than selectbox. We are already using that time being.

Hi Caroline,
Is there any news on this topic? In my use case I would need to show different records to different users, it would be nice to get the ID from the login