簡體   English   中英

在使用cognito進行身份驗證時,IE11上的提取未定義

[英]Fetch is undefined on IE11 when authenticating with cognito

我有一個我登錄的ember應用程序,它使用ember-cognito和ember-simple-auth對我進行身份驗證。

this.get('sessionService').authenticate('authenticator:cognito', credentials).then(() => {
         console.log('authenticated');
    }).catch(( reason ) => {

        console.log(reason);
    });

這適用於每個瀏覽器,除了我得到錯誤'fetch未定義'。

這出現在catch部分,這意味着cognito正在嘗試使用fetch。

我一直在研究這個,但無法找到適合我的方案的解決方案。

只需將isomorphic-fetch包含為polyfill,即可在不受支持的瀏覽器上運行。

https://github.com/matthew-andrews/isomorphic-fetch

請安裝isomorphic-fetch polyfill:

npm install --save isomorphic-fetch es6-promise

欲了解更多信息請訪問這里

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM