S
Solara17mo ago
Tao

couple of questions around session

couple of questions around session management: 1. I found Solara manages session via cookie which is good, could we figure out a standard way to expose session_id to application layer ? for me, my first thing on my web app is to set session id via localstorage and wait for the value before rendering anything, I think the Solara managed session is just perfect for my need to identify a session.
2 Replies
mariobuikhuizen
mariobuikhuizen17mo ago
@MaartenBreddels will look into this.
MaartenBreddels
MaartenBreddels17mo ago
ok, there is no (public) api for this, and it's only available in the feat_reconnect branch (the one that reconnects the websocket) you can call solara.server.app.get_current_context().session_id in a component it's unlikely to break, but it's not a stable api, so we cannot guarantee it but.. exposing this session id is absolutely something we plan to do. this can be useful to store things in databases etc
Want results from more Discord servers?
Add your server