Spaces:
Sleeping
Sleeping
Commit History
-
Wire app.py/secrets/requirements to the new cookie-based token store
Completes the previous commit -- these didn't get staged there because git add aborted when one of the paths in that batch (the deleted token_store.py) no longer existed. app.py now imports cookie_token_store instead of token_store; secrets.toml/bootstrap_secrets.py use a [cookies] section instead of [supabase]; requirements.txt swaps psycopg2-binary for extra-streamlit-components. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>2f83d3e -
Add saved-players/game-history tabs and persistent Drive access via Supabase
- Points Tracker setup now has New Game / Saved Players / Game History tabs. Game name is picked from history (with a + New game name fallback) instead of always free-typed; Saved Players and Game History are read-only browsers backed by sheets_backend.list_players and the new list_game_names helper. - st.login() alone can never give us a refresh_token -- Streamlit's own _auth_callback discards anything but id_token/access_token before user code runs. Added a separate, one-time Connect Google Drive flow (src/google_oauth.py) using access_type=offline plus prompt=consent to force Google to issue one, and store it Fernet- encrypted in a Supabase Postgres table (src/token_store.py). On every subsequent login, app.py silently redeems a fresh access token from the stored refresh_token -- no repeat consent screen. Falls back to showing the Connect Drive button only when no valid session token and no usable stored refresh_token exist, and clears a revoked/invalid …76b596f
-
Switch Sheets persistence to per-user OAuth instead of a service account
Service accounts have zero Drive storage quota, so they can never create a new file (even in a folder shared with them) -- confirmed by testing the raw Drive API directly. Instead, request the drive.file scope during Google login and expose the resulting access token via Streamlit's expose_tokens=["access"], so each user's own account creates and owns their spreadsheet directly. Drops the service account, shared folder, and index-spreadsheet machinery entirely. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1b35f8e -
Add optional Google login with Sheets-backed persistence for Points Tracker
Anonymous play is unchanged. Logging in via the sidebar provisions a per-user Google Sheet (owned by a service account) with players and games_played worksheets, and Points Tracker writes player/round data to it as you play. Secrets are gitignored locally and can be assembled from individual env vars on deploy (src/bootstrap_secrets.py) so nothing sensitive needs to live in the image. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>5d4959a