0

I have an ember app where I log on and it authenticates me using ember-cognito and ember-simple-auth.

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

        console.log(reason);
    });

This works on every browser except ie which i get the error 'fetch is not defined'.

This appears in the catch section which means cognito is trying to use fetch.

I have been looking into this but cant find a solution for my scenario.

Will Daniels
  • 135
  • 8

2 Answers2

1

Just include isomorphic-fetch as polyfill to make it work on unsupported browsers.

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

Adeel Imran
  • 11,224
  • 7
  • 56
  • 74
0

Please install isomorphic-fetch polyfill :

npm install --save isomorphic-fetch es6-promise

For more info visit here

Murtaza Hussain
  • 2,592
  • 18
  • 21