idea-aws 3.10.7 → 3.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cognito.js +5 -1
- package/package.json +1 -1
package/dist/src/cognito.js
CHANGED
|
@@ -99,6 +99,7 @@ class Cognito {
|
|
|
99
99
|
if (typeof cognitoUserOrEmail === 'object') {
|
|
100
100
|
const user = cognitoUserOrEmail;
|
|
101
101
|
UserAttributes.push({ Name: 'name', Value: user.name });
|
|
102
|
+
UserAttributes.push({ Name: 'picture', Value: user.picture });
|
|
102
103
|
Object.keys(user.attributes).forEach(a => UserAttributes.push({ Name: 'custom:'.concat(a), Value: String(user.attributes[a]) }));
|
|
103
104
|
}
|
|
104
105
|
const params = {
|
|
@@ -212,7 +213,10 @@ class Cognito {
|
|
|
212
213
|
* Update a (Cognito)User's attributes, excluding the attributes that require specific methods.
|
|
213
214
|
*/
|
|
214
215
|
async updateUser(user, cognitoUserPoolId) {
|
|
215
|
-
const UserAttributes = [
|
|
216
|
+
const UserAttributes = [
|
|
217
|
+
{ Name: 'name', Value: user.name },
|
|
218
|
+
{ Name: 'picture', Value: user.picture }
|
|
219
|
+
];
|
|
216
220
|
Object.keys(user.attributes).forEach(customAttribute => UserAttributes.push({
|
|
217
221
|
Name: 'custom:'.concat(customAttribute),
|
|
218
222
|
Value: String(user.attributes[customAttribute])
|