I would like to be able to access the browsers cookies (or local storage or some equivalent persistent state) to store user’s API tokens so they don’t need to login to a service every time they load a panel app.
It looks like you provide access to cookies via pn.state.cookies, but as far as I can tell this is just a single session state that is stored in memory and not on disk.
I am curious, what is the point of the cookies attribute at all? It seems disingenuous to suggest it allows access cookies stored in the browser, since that doesn’t seem true
With pn.state.cookies you will be able to read the cookies that are set when the client/ browser makes the initial request. It will not enable you to read the current cookies (if they changed) or to set them.
Why the functionality is limited, I don’t know. But its probably because no one besides us have ever needed it or made a Feature Request. Feel free to make a feature request or even better contribute an improvement.