[英]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,即可在不受支持的瀏覽器上運行。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.