Skip to content
This repository has been archived by the owner on Feb 24, 2018. It is now read-only.

Commit

Permalink
TOTP support and new MFA configuration APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ionut Trestian committed Nov 29, 2017
1 parent b70ef51 commit 258b0f0
Show file tree
Hide file tree
Showing 10 changed files with 7,341 additions and 1,558 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -774,9 +774,41 @@ The CookieStorage object receives a map (data) in its constructor that may have
totpRequired : function(secretCode) {
var challengeAnswer = prompt('Please input the TOTP code.' ,'');
cognitoUser.sendMFACode(challengeAnswer, this, 'SOFTWARE_TOKEN_MFA');
},

mfaRequired: function(codeDeliveryDetails) {
var verificationCode = prompt('Please input verification code' ,'');
cognitoUser.sendMFACode(verificationCode, this);
}
});

**Use case 28.** Enabling and setting SMS MFA as the preferred MFA method for the user.

smsMfaSettings = {
PreferredMfa : true,
Enabled : true
};
cognitoUser.setUserMfaPreference(smsMfaSettings, null, function(err, result) {
if (err) {
alert(err);
}
console.log('call result ' + result)
});

**Use case 29.** Enabling and setting TOTP MFA as the preferred MFA method for the user.

totpMfaSettings = {
PreferredMfa : true,
Enabled : true
};
cognitoUser.setUserMfaPreference(null, totpMfaSettings, function(err, result) {
if (err) {
alert(err);
}
console.log('call result ' + result)
});


## Network Configuration
The Amazon Cognito Identity JavaScript SDK will make requests to the following endpoints
* For Amazon Cognito Identity request handling: "https://cognito-idp.us-east-1.amazonaws.com"
Expand All @@ -790,6 +822,10 @@ In order to authenticate with the Amazon Cognito Identity Service, the client ne

## Change Log

**v1.27.0:**
* What has changed
* Added support for TOTP and new MFA settings APIs.

**v1.26.0:**
* What has changed
* Fixed typescript typings.
Expand Down
Loading

0 comments on commit 258b0f0

Please sign in to comment.