3

Using: aws-amplify 0.3.3, aws-amplify-react-native 0.2.9., redux-saga 0.15.6

While calling the Auth.confirmSignIn using redux-saga:

let confirmedUserData = yield call([Auth, Auth.confirmSignIn], userObj, authCode, 'SMS');

Getting the following error: "TypeError: user.sendMFACode is not a function"

The response object from Auth.signIn is the following: https://d.pr/AX6IQI. This response object is what gets passed to Auth.confirmSignIn as the user object. While looking into the response object, there is not sendMFACode function. Further, seeing the following: https://d.pr/i/gmzi0E which exists multiple times throughout the response object:

"TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them"

I'm not sure if the error above is relative to the "TypeError: user.sendMFACode is not a function" error as I'm not sure where the sendMFACode is supposed to live.

The Auth.confirmSignIn function looks like this: https://gist.github.com/grgaortiz/9a9dacefe1deca932396beea34ebebf2. You can see it trying to call the sendMFACode function from the response "user" object.

There is a closed github issue but the resolution was to swap out redux-saga for redux-thunk which doesn't really crack the problem.

George Ortiz
  • 97
  • 2
  • 9

0 Answers0