fix: Cookie値がArrayになりstripエラーが発生する問題を修正 (#18)#41
Merged
Conversation
- `cookies[key]` → `request.cookies[key]` に変更(flat string hashで返るためArray問題を回避) - `before_action` → `prepend_before_action` に変更(DeviseTokenAuthのset_user_by_tokenより先に実行) - OmniauthCallbacksControllerでset_auth_headers_from_cookiesをskip Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Cookie経由での認証テストを追加(このテストがあれば本番エラーは事前に検出できた) - OAuthコールバックのリクエストスペックを新規追加 - rails_same_site_cookieをGemfileから削除(Rack3.xでArray Set-Cookieヘッダーのstripエラーが発生するため) - Rails 7.1のcookies_same_site_protection = :noneで代替済み - OmniauthCallbacksControllerにset_flash_messageのno-opオーバーライドを追加(APIモードでflash未使用のため) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
cookies[key]→request.cookies[key]に変更。cookiesはCookieJarで値がArrayになる場合があるが、request.cookiesはflat string hashのため文字列のみ返すbefore_action→prepend_before_actionに変更。DeviseTokenAuthのset_user_by_tokenより先にCookieヘッダーをセットする順序を保証するOmniauthCallbacksControllerにskip_before_action :set_auth_headers_from_cookiesを追加。OAuth callbackはCookieからの認証ヘッダー注入が不要なためTest plan
🤖 Generated with Claude Code