Open Yanni8 opened 8 months ago
You can't use cookies in shared environments, because cookies are tied to the domain in user's browser (i.e. on client side). Session state has nothing to do with that at all. Shared environment needs a way to separate cookies. See my answer to you in another issue, where you asked for a link.
st.session_state
can be used to store persistence variables that will stay the same during reruns. The cool thing is that every user/session (A session is a browser Tap in this case) has its own Session State.You currently can't use the Cookie Manager really in Shared Environments
If I understand correctly, this is because the cookie manager stores a local copy of all cookies.
https://github.com/Mohamed-512/Extra-Streamlit-Components/blob/9bd08dc4059952dab1a95a6e0727ccd21eb6b60a/extra_streamlit_components/CookieManager/__init__.py#L19
But by using Session State each user would get their own Manager → No Leaked Cookies.
Am I missing something, or would this be a better approach? @Mohamed-512