Repository navigation
Put the data chat behind a shared access code - #181
Merged
Merged
Conversation
Until there are accounts, CHAT_ACCESS_CODE lets testers use chat on a reachable server without opening it to everyone. Entering the code on /chat sets a signed HttpOnly cookie that the chat and chart data routes require; the Ask link stays hidden until then. Changing the code signs everyone out.
iansargent
reviewed
Nov 10, 2026
iansargent
reviewed
Nov 10, 2026
iansargent
left a comment
Collaborator
There was a problem hiding this comment.
I like this feature, of course until we create proper profiles!
iansargent
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chat is on-for-everyone or off today, so we can't let testers use it on a reachable server without also opening it (and the OpenRouter bill) to anyone. Until there are accounts, this adds an optional shared access code. Testers go to `/chat`, enter the code, and get a signed HttpOnly cookie that the chat routes require. The "Ask" link stays hidden until then. Chat history is still only in the browser's localStorage, so nothing new is stored on the server.
It's a stopgap: anyone given the code can pass it on, and the only way to revoke access is to change the code, which signs everyone out. The check is one FastAPI dependency, so a magic-link login can replace it later.