Skip to content

Commit

Permalink
Merge branch 'master' into auth-currentUserInfo-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
powerful23 committed Apr 6, 2018
2 parents a38827f + 2a1428d commit 3093bfd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
4 changes: 2 additions & 2 deletions docs/media/pub_sub_guide.md
Expand Up @@ -4,9 +4,9 @@

AWS Amplify PubSub module provides connectivity with cloud-based message-oriented middleware. You can use PubSub to pass messages between your app instances and your app's backend for creating real-time interactive experiences.

PubSub is available with **Generic MQTT Over WebSocket Provider** and AWS IoT *(Coming soon)*.
PubSub is available with **AWS IoT** and **Generic MQTT Over WebSocket Provider**.

When you use AWS IoT, AWS Amplify PubSub module will automatically sign your HTTP requests when sending your messages.
With AWS IoT, AWS Amplify PubSub module automatically signs your HTTP requests when sending your messages.
{: .callout .callout--info}

## Installation and Configuration
Expand Down
2 changes: 2 additions & 0 deletions packages/amazon-cognito-identity-js/.npmignore
@@ -0,0 +1,2 @@
.babelrc

48 changes: 24 additions & 24 deletions packages/amazon-cognito-identity-js/README.md
Expand Up @@ -216,7 +216,7 @@ The usage examples below use the unqualified names for types in the Amazon Cogni

userPool.signUp('username', 'password', attributeList, null, function(err, result){
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
cognitoUser = result.user;
Expand All @@ -241,7 +241,7 @@ The usage examples below use the unqualified names for types in the Amazon Cogni
var cognitoUser = new AmazonCognitoIdentity.CognitoUser(userData);
cognitoUser.confirmRegistration('123456', true, function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('call result: ' + result);
Expand All @@ -253,7 +253,7 @@ The usage examples below use the unqualified names for types in the Amazon Cogni
```javascript
cognitoUser.resendConfirmationCode(function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('call result: ' + result);
Expand Down Expand Up @@ -307,7 +307,7 @@ The usage examples below use the unqualified names for types in the Amazon Cogni
},

onFailure: function(err) {
alert(err);
alert(err.message || JSON.stringify(err));
},

});
Expand All @@ -322,7 +322,7 @@ Note also that if CognitoUser.authenticateUser throws ReferenceError: navigator
```javascript
cognitoUser.getUserAttributes(function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
for (i = 0; i < result.length; i++) {
Expand All @@ -341,7 +341,7 @@ Note that the inputVerificationCode method needs to be defined but does not need
console.log('call result: ' + result);
},
onFailure: function(err) {
alert(err);
alert(err.message || JSON.stringify(err));
},
inputVerificationCode: function() {
var verificationCode = prompt('Please input verification code: ' ,'');
Expand All @@ -358,7 +358,7 @@ Note that the inputVerificationCode method needs to be defined but does not need

cognitoUser.deleteAttributes(attributeList, function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('call result: ' + result);
Expand All @@ -378,7 +378,7 @@ Note that the inputVerificationCode method needs to be defined but does not need

cognitoUser.updateAttributes(attributeList, function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('call result: ' + result);
Expand All @@ -390,7 +390,7 @@ Note that the inputVerificationCode method needs to be defined but does not need
```javascript
cognitoUser.enableMFA(function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('call result: ' + result);
Expand All @@ -402,7 +402,7 @@ Note that the inputVerificationCode method needs to be defined but does not need
```javascript
cognitoUser.disableMFA(function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('call result: ' + result);
Expand All @@ -414,7 +414,7 @@ Note that the inputVerificationCode method needs to be defined but does not need
```javascript
cognitoUser.changePassword('oldPassword', 'newPassword', function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('call result: ' + result);
Expand All @@ -430,7 +430,7 @@ Note that the inputVerificationCode method needs to be defined but does not need
console.log('CodeDeliveryData from forgotPassword: ' + data);
},
onFailure: function(err) {
alert(err);
alert(err.message || JSON.stringify(err));
},
//Optional automatic callback
inputVerificationCode: function(data) {
Expand All @@ -456,7 +456,7 @@ Note that the inputVerificationCode method needs to be defined but does not need
```javascript
cognitoUser.deleteUser(function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('call result: ' + result);
Expand Down Expand Up @@ -508,7 +508,7 @@ In React Native, loading the persisted current user information requires an extr
if (cognitoUser != null) {
cognitoUser.getSession(function(err, session) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('session validity: ' + session.isValid());
Expand Down Expand Up @@ -577,7 +577,7 @@ In React Native, loading the persisted current user information requires an extr
console.log('call result: ' + result);
},
onFailure: function(err) {
alert(err);
alert(err.message);
}
});

Expand All @@ -592,7 +592,7 @@ In React Native, loading the persisted current user information requires an extr
console.log('call result: ' + result);
},
onFailure: function(err) {
alert(err);
alert(err.message || JSON.stringify(err));
}
});
```
Expand All @@ -607,7 +607,7 @@ In React Native, loading the persisted current user information requires an extr
console.log('call result: ' + result);
},
onFailure: function(err) {
alert(err);
alert(err.message || JSON.stringify(err));
}
});
```
Expand All @@ -621,7 +621,7 @@ In React Native, loading the persisted current user information requires an extr
console.log('call result: ' + result);
},
onFailure: function(err) {
alert(err);
alert(err.message || JSON.stringify(err));
}
});
```
Expand All @@ -636,7 +636,7 @@ In React Native, loading the persisted current user information requires an extr
console.log('call result: ' + result);
},
onFailure: function(err) {
alert(err);
alert(err.message || JSON.stringify(err));
}
});
```
Expand Down Expand Up @@ -678,7 +678,7 @@ In React Native, loading the persisted current user information requires an extr
```javascript
cognitoUser.getMFAOptions(function(err, mfaOptions) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('MFA options for user ' + mfaOptions);
Expand Down Expand Up @@ -758,7 +758,7 @@ The CookieStorage object receives a map (data) in its constructor that may have
},

onFailure: function(err) {
alert(err);
alert(err.message || JSON.stringify(err));
},

mfaSetup: function(challengeName, challengeParameters) {
Expand Down Expand Up @@ -796,7 +796,7 @@ The CookieStorage object receives a map (data) in its constructor that may have
};
cognitoUser.setUserMfaPreference(smsMfaSettings, null, function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
}
console.log('call result ' + result)
});
Expand All @@ -811,7 +811,7 @@ The CookieStorage object receives a map (data) in its constructor that may have
};
cognitoUser.setUserMfaPreference(null, totpMfaSettings, function(err, result) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
}
console.log('call result ' + result)
});
Expand Down Expand Up @@ -842,7 +842,7 @@ The CookieStorage object receives a map (data) in its constructor that may have
```js
cognitoUser.getUserData(function(err, userData) {
if (err) {
alert(err);
alert(err.message || JSON.stringify(err));
return;
}
console.log('User data for user ' + userData);
Expand Down

0 comments on commit 3093bfd

Please sign in to comment.