Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookies not working in cloud deployments / docker #197

Open
brdemorin opened this issue Aug 19, 2024 · 3 comments
Open

Cookies not working in cloud deployments / docker #197

brdemorin opened this issue Aug 19, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@brdemorin
Copy link

Mohammed, I swear, last one. This is the most important one of all -> Cookies work fine locally until deploying to streamlit community cloud or any cloud via docker. When I test docker locally, no cookie data retained

Earlier versions I created yesterday were setting/getting cookie in cloud deployments. So I went back revisions to see where it broke and why. However, NONE of those earlier versions retain cookie info in cloud deployments anymore.

@mkhorasani mkhorasani added the help wanted Extra attention is needed label Aug 20, 2024
@mkhorasani
Copy link
Owner

mkhorasani commented Aug 20, 2024

Hi @brdemorin, yes unfortunately I am aware of problems with cookies being implemented on cloud servers. Streamlit is in the process of implementing its own native cookies feature, and I will be gradually rolling it out in the hopes of solving these problems once and for all!

@LeeOSO
Copy link

LeeOSO commented Aug 29, 2024

I encountered the same issue where everything worked as expected during local testing, with cookies being written correctly and login status being maintained properly. However, when the project was deployed to the server, I noticed that cookies would sometimes be written and sometimes not. When cookies were not written, the login status could not be maintained. Could you please advise on how to resolve this issue? @mkhorasani

@mkhorasani
Copy link
Owner

I encountered the same issue where everything worked as expected during local testing, with cookies being written correctly and login status being maintained properly. However, when the project was deployed to the server, I noticed that cookies would sometimes be written and sometimes not. When cookies were not written, the login status could not be maintained. Could you please advise on how to resolve this issue? @mkhorasani

Hi @LeeOSO, currently, I am using a third party package to read/write cookies, as soon as Streamlit updates st.context to include writing cookies, I will update Streamlit-Authenticator in the hopes that this problem can be solved once and for all. Thank you for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants