Repository navigation
fix(SEC-P1-20261031): 共用 github.io origin 上停用 Supabase 登入 - #18
Merged
Merged
Conversation
- React 前端與舊版 learn.js 在 *.github.io 上不建立 Supabase auth client,登入區塊與按鈕顯示停用原因;其他網域行為不變。 - deploy/github-supabase-deploy.md 開頭加上重建前必讀:前端改放獨立網域(例如 *.pages.dev),OAuth origin、Site URL 與 CORS_ORIGINS 改填該網域。 - 線上後端已於 2026-09-21 停用、目前沒有登入流量;本修改避免日後重建時把 session 存進共用 origin。 驗證:vite build 通過、learn.js 語法檢查通過、Playwright smoke 5 項通過;以合成 Supabase 設定建置後模擬 frobel0520.github.io 顯示停用說明、*.pages.dev 顯示「使用 Google 登入」。 Refs #17
- 上一個 commit 以腳本修改 learn.js 時把原本的 CRLF 換行轉成 LF,造成整檔差異;改回 CRLF,與 dev 的差異只剩停用登入的 4 行。 驗證:git diff origin/dev 只剩實際修改行;node --check 通過。 Refs #17
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.
Refs #17
問題
*.github.io是帳號下所有 Pages 專案共用的 origin,Supabase Auth 會把登入 session 存在 localStorage,任一 Pages 站的腳本都讀得到。線上後端已於 2026-09-21 停用,目前沒有登入流量;風險在日後重建時。修改
frontend/src/App.jsx、static/js/learn.js:在*.github.io上不建立 Supabase auth client,登入區塊顯示停用原因;其他網域不變。deploy/github-supabase-deploy.md:重建前必讀,前端改放獨立網域(例如*.pages.dev)。驗證
vite build通過、learn.js語法檢查通過、Playwright smoke 5 項通過。frobel0520.github.io顯示停用說明;*.pages.dev顯示「使用 Google 登入」。限制
learn.js換行(CRLF→LF)改回來;整體 diff 只剩 16 行實際修改。dev,再隨 dev → main 發布。Generated by Claude Code