Sharing Public App for users of "@domain.com"

Hi Everyone,
Is it possible to configure a private app so that all people belonging to a domain (like “@company.com”) can access it?
I am targeting around 200 users and entering such a list seems a little bit overkill…
I’ve checked in “Share your app - Streamlit Docs” but did not find any information related to it.
(I think it would be a cool feature btw!)
Thanks :grinning:

1 Like

Hi @pierrelouisbescond,

Thanks for posting!

At present, we require you to manually copy and paste email addresses to facilitate access sharing. There are no plans to incorporate this feature in the future of Community Cloud.

1 Like

Could you check the accessing request header and if it isn’t what is expected reject the access?

You can deploy a Streamlit app to GCP using Docker and configure the access in GCP IAM for a particular domain (@company.com). This is what I did for our use case

1 Like

Hi @Oleksandr_Arsentiev,
Indeed (our Cloud environment is in Azure but the same principles would apply). I was looking for a way to configure it directly from the Streamlit Cloud space.

What if you deploy your app at streamlit.io then you can customize your app there like yourappname.streamlit.app next you can redirect your yourappname.company.com to that web address.

But about limiting your app user you can use authentication and user will need to input the right user password.

You can use the experimental user funcitonality.
Read more here: https://docs.streamlit.io/library/api-reference/personalization/st.experimental_user

Every user can get a Streamlit account using their work email here
https://share.streamlit.io/signup

Then they can login and access your app, that may be public, but you can include this code at the top:

if not st.experimental_user['email'].endswith("@domain.com"):
   st.write("This app is private!")
   st.write(...) # provide info and istructions about how to register/login
   st.stop()

This prevents external users from running your app.
If you have a multipage app, make sure you include this code on every page!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.