Repository navigation
fix(cms-auth): GITHUB_CLIENT_ID を wrangler.toml で管理し CMS ログインを復旧する - #323
Merged
Merged
Conversation
本番の sveltia-cms-auth Worker には GITHUB_CLIENT_SECRET しか残っておらず、 新規ログインが MISCONFIGURED_CLIENT になっていた(ログイン済みブラウザは保存済み トークンで動くため気づきにくい)。Client ID は認可 URL に載る公開値なので、 ALLOWED_DOMAINS と同じく [vars] で管理して配備ごとに必ず設定する。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WthszjoYsBn39cjTaRXQ5M
|
🔍 Cloudflare Workers preview: https://bluemoon-pr-323.tsubasa-azumagakito.workers.dev (このコメントは新しいpushのたびに更新されます) |
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.
背景
Sveltia CMS に新しくログインしようとすると(シークレットウィンドウなど)、「OAuth アプリのクライアント ID またはシークレットが設定されていません」と表示されて失敗します。
sveltia-cms-authWorker にGITHUB_CLIENT_SECRETしか残っていないことです。fix(cms-auth): ALLOWED_DOMAINS を wrangler.toml で管理し、配備で消えないようにする #322 の後に/authがMISCONFIGURED_CLIENTを返すことを実測し、利用者もシークレットウィンドウで同じエラーを確認しています。変更
workers/sveltia-cms-auth/wrangler.tomlの[vars]にGITHUB_CLIENT_IDを追加しました。ALLOWED_DOMAINSと同じく repo で管理し、配備のたびに必ず設定されるようにします。GITHUB_CLIENT_SECRETが残っていることは確認済みです)。検証
wrangler deploy --dry-run --config workers/sveltia-cms-auth/wrangler.toml(wrangler 4.151.3)で、env.ALLOWED_DOMAINSとenv.GITHUB_CLIENT_IDが binding に出ることを確認しました。/auth?provider=github&site_id=www.bluemoon.worksが GitHub の認可 URL に転送されることを確認する🤖 Generated with Claude Code
https://claude.ai/code/session_01WthszjoYsBn39cjTaRXQ5M