
內容簡介
這是一個針對需要使用者登錄的 WordPress 網站而設計的外掛程式(例如使用 WPO365 插件的 Microsoft 登錄),並且其內容加載在嵌入式 iframe 中(例如 Microsoft Teams App / Tab 或類似內容)。此外掛程式會覆蓋 WordPress 中的可插拔函式 wp_set_auth_cookie,以始終將 SameSite 設定為 None 以啟用第三方 cookie 的使用。
前提條件
當 cookie 的「Secure」標誌被設置時,僅像 Chrome 等瀏覽器才會尊重 SameSite=None 標誌。因此,為了使該外掛程式有效啟用瀏覽器對第三方 cookie 的支援,該網站必須使用 SSL。
支援
如果外掛程式無法正常工作,我將竭盡所能提供支援。請前往我們的支援頁面聯繫我們。我無法在所有可能的 WordPress 組態和版本中進行測試,因此很樂意聽取您的反饋並學習!
回饋
如果您是開發人員並且對程式碼感興趣,您應該查看對應的 gist,它位於 github。
開放原始碼
如果您是開發人員並且對程式碼感興趣,您應該查看對應的 gist,它位於 github。
外掛標籤
開發者團隊
原文外掛簡介
Plugin for WordPress websites that require a user to sign in (e.g. with Microsoft using the WPO365 plugin) and that are loaded inside an iframe (e.g. inside a Microsoft Teams App / Tab or similar). The plugin overrides the pluggable WordPress function wp_set_auth_cookie to always set SameSite=None to enable third-party usage of cookies.
Prerequisites
The SameSite=None flag is only respected by browsers such as Chrome when the cookie’s Secure flag is set. Therefore the website must use SSL for the plugin to effectively enable browser support for 3rd party cookies.
Support
I will go to great length trying to support you if the plugin doesn’t work as expected. Go to our Support Page to get in touch. I haven’t been able to test our plugin in all endless possible WordPress configurations and versions so I am keen to hear from you and happy to learn!
Feedback
I am keen to hear from you so share your feedback with me on Twitter and help me get better!
Open Source
When you’re a developer and interested in the code you should have a look at the corresponding gist at github.
