Skip to content

Commit

Permalink
Merge pull request aws-amplify#1451 from powerful23/cognito-deprecate…
Browse files Browse the repository at this point in the history
…-methods

deprecate methods disableMFA and enableMFA
  • Loading branch information
powerful23 authored Aug 15, 2018
2 parents bedbe81 + fe1324f commit 52a4a1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/amazon-cognito-identity-js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ Note that the inputVerificationCode method needs to be defined but does not need

**Use case 9.** Enabling MFA for a user on a pool that has an optional MFA setting for an authenticated user.

Note: this method is now deprecated. Please use `setUserMfaPreference` instead.

```javascript
cognitoUser.enableMFA(function(err, result) {
if (err) {
Expand All @@ -406,6 +408,8 @@ Note that the inputVerificationCode method needs to be defined but does not need

**Use case 10.** Disabling MFA for a user on a pool that has an optional MFA setting for an authenticated user.

Note: this method is now deprecated. Please use `setUserMfaPreference` instead.

```javascript
cognitoUser.disableMFA(function(err, result) {
if (err) {
Expand Down
2 changes: 2 additions & 0 deletions packages/amazon-cognito-identity-js/src/CognitoUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ export default class CognitoUser {

/**
* This is used by an authenticated user to enable MFA for himself
* @deprecated
* @param {nodeCallback<string>} callback Called on success or error.
* @returns {void}
*/
Expand Down Expand Up @@ -918,6 +919,7 @@ export default class CognitoUser {

/**
* This is used by an authenticated user to disable MFA for himself
* @deprecated
* @param {nodeCallback<string>} callback Called on success or error.
* @returns {void}
*/
Expand Down

0 comments on commit 52a4a1a

Please sign in to comment.