Mohamed-512 / Extra-Streamlit-Components

An all in one place, to find complex or just not available components by default on streamlit.
Apache License 2.0
484 stars 60 forks source link

Cookies as a server (get all including defined externally) #20

Closed miannini closed 2 years ago

miannini commented 2 years ago

I was looking into a way to get all cookies, even those defined externally such as web_auth in a login page. I think that there is a solution in the universal-cookie package:

https://www.npmjs.com/package/universal-cookie

Server Example: const cookies = new Cookies(req.headers.cookie);

so could be possible to have an additional version for server?

at this moment I see only this option available in extra_streamlit_components/CookieManager/frontend/src/CookieManager.jsx: const cookies = new Cookies()

Mohamed-512 commented 2 years ago

The package doesn't have server support as the CookieManager is a frontend component which communicates back to the server. Not the other way around.