Remove Supabase auth and store OpenTopography API key in localStorage#1
Remove Supabase auth and store OpenTopography API key in localStorage#1TsProphet94 wants to merge 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfa172b8b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const response = await fetch(`${CONFIG.API_URL}/api/generate`, { | ||
| method: 'POST', | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| 'Authorization': `Bearer ${token}` | ||
| 'Content-Type': 'application/json' | ||
| }, |
There was a problem hiding this comment.
Restore auth header or drop server auth check
With this change the /api/generate request no longer includes an Authorization header, but the backend still enforces @require_auth and rejects requests without Bearer ... when SUPABASE_URL is configured (see require_auth in app.py which returns 401 if the header is missing and Supabase is set). In any environment where SUPABASE_URL remains set (i.e., typical production), map generation will now fail with 401 despite valid API keys. Either remove/relax the server-side auth check or keep sending a token when Supabase is configured.
Useful? React with 👍 / 👎.
Motivation
CONFIGcontaining onlyAPI_URL.Description
webapp/static/index.htmland eliminated UI elements that referenced an account (e.g., user email and sign-out button).CONFIGwith a minimalCONFIG = { API_URL: window.location.origin }and removed Supabase keys.localStorageunder the keyopenfront_api_keyand updated settings copy to reflect local-only storage.showApp()run on page load unconditionally and removed theAuthorizationheader/token logic fromgenerateMap().Testing
PYENV_VERSION=3.11.12 python -m http.server 8000and verified the page served successfully.http://127.0.0.1:8000/static/index.htmland captured a screenshot to confirm the settings modal and local-storage flow; the screenshot artifact was produced successfully.git commit) to the local branch, which completed successfully.Codex Task