Signed per-user chat tokens with the JWT library already pulled in by the Stream Ruby client, after that client no longer exposed a token helper. Encoding with the API secret and a TTL was simple and covered by tests.
- What worked
- Local JWT minting was clear, needed no extra gem, and produced tokens the page could pass to the browser client without exposing the secret.