1

我建立使用OIDC客戶端登錄到IDP一個SPA內置使用Identity Server的4CSP問題

登錄重定向似乎很好地工作,但在我的Firefox 「M得到以下CSP發出

enter image description here

Content Security Policy: Ignoring "'unsafe-inline'" within script-src or style-src: nonce-source or hash-source specified (unknown) 
Content Security Policy: The page's settings blocked the loading of a resource at self ("script-src 'unsafe-inline' 'sha256-VDXN0nOpFPQ102CIVz+eimHA5e+wTeoUUQj5ZYbtn8w='"). Source: !function(t){function __webpack_require_.... checksession:1 
Content Security Policy: The page's settings blocked the loading of a resource at self ("script-src 'unsafe-inline' 'sha256-VDXN0nOpFPQ102CIVz+eimHA5e+wTeoUUQj5ZYbtn8w='"). Source: window.devToolsOptions = Object.assign(w.... checksession:1 
Load denied by X-Frame-Options: http://localhost:5007/home/error?errorId=a74accc61bb821ee1f42f7013a306e90 does not permit cross-origin framing. (unknown) 

我沒有設置我的SPA任何CSP meta標籤,我想知道,如果我不得不這樣做。 挖掘一點點似乎oidc客戶端是添加一個iframe到我的應用程序,它指向在Identity Server中的checksession頁面(其中包括CSP頭「default-src'none'; script-src'unsafe-inline' 'sha256-VDXN0nOpFPQ102CIVz + eimHA5e + wTeoUUQj5ZYbtn8w ='「)

有人可以幫我解決這個問題,或者讓我走向正確的方向嗎?我對CSP的瞭解是非常基本的。

+0

我恰好在診斷目前完全相同的問題。我們正在體驗鉻合金的行爲。我剛剛更新了IDSrvr4。可能與https://github.com/IdentityServer/IdentityServer4/issues/659有關。或者這.. https://stackoverflow.com/questions/41854600/identityserver-used-as-external-identity-provider-for-another-identityserver-fai/41862927#answer-41862927 – ttugates

+0

你是否還經歷「框架窗口超時「在signinSilent時,應用程序關閉時,toke過期? https://github.com/IdentityModel/oidc-client-js/issues/311 – ttugates

+0

這裏打開了這個.. https://github.com/IdentityModel/oidc-client-js/issues/357 – ttugates

回答

0

這是Redux devtools插件試圖在頁面上注入他們的代碼。