amazon-archives / amazon-cognito-identity-js

Amazon Cognito Identity SDK for JavaScript
Other
984 stars 454 forks source link

cognitoidentityserviceprovider.verifySoftwareToken is not a function #654

Closed jackmandelkorn closed 6 years ago

jackmandelkorn commented 6 years ago

For some reason this method is broken on my end. I downloaded the newest versions of the two API files, and the function is still undefined. All the other methods are there, though. Weird.

jackmandelkorn commented 6 years ago

Here's my code:

var cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider({apiVersion: '2016-04-18'});
$("#submit-button").on('click touchstart', function() {verify();});

function verify() {
  var params = {
    UserCode: document.getElementById("verification-code").value
  };
  cognitoidentityserviceprovider.verifySoftwareToken(params, function(err, data) {
    if (err) console.log(err, err.stack);
    else     console.log(data);
  });
}