A WebSocket Stays Open After Its Token Expires
A WebSocket carries credentials once, at the handshake, and afterwards the server holds only a verdict. When the token expires or is revoked, the open socket does not change. The Origin header checked at the handshake is the browser’s statement about which page opened the socket, not proof of who is connecting. A small server that enforces expiry itself, accepts renewals under four rules, and checks Origin by exact match while always requiring a separate credential, with tests and a headless Chrome check.