Accessing session_info in 1.12+

Hey @ennui,

Thanks for surfacing this! The Server.get_current() method disappearing was indeed a consequence of a major refactor to the Streamlit internals that had its first changes appear in 1.12.0. As far as I know, there’s no easy way to access websocket connection headers for a given browser tab with its removal (there may be some clever hack possible, but it’s non-obvious).

While this API was technically internal/undocumented, we also recognize that a lot of people rely on it for auth purposes. We’re currently considering ways to revive the functionality (potentially in a more user-friendly form) in a future release, and the status of this is being tracked in this GitHub issue: Accessing websocket headers in Streamlit 1.12.0 · Issue #5166 · streamlit/streamlit · GitHub.