Open 10ky opened 5 years ago
I came across the same requirement. Especially when using CodeGrantFlow. Therefore I modified the Amazon Cognito Auth source to support to promise.
https://www.npmjs.com/package/amazon-cognito-auth-js-promises ( Updated Documentation with promises example )
I would like to use Promise instead of callbacks. Something like this:
I was wondering if I can use redux thunk to make a async call of getSession and handle the callbacks as Promises.
What is the best way to do this? It looks to me amazon-cognito-auth-js is not written as a ES6 lib. Any chance it will be upgraded to ES6 or later?