Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

idea-toolbox

Package Overview
Dependencies
Maintainers
1
Versions
377
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

idea-toolbox - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

18

index.js

@@ -21,3 +21,3 @@ 'use strict';

// COGNITO
cognitoGetUserByClaims, cognitoGetUserByEmail,
cognitoGetUserByClaims, cognitoGetUserByEmail, cognitoGetUserBySub,
// SES

@@ -222,2 +222,18 @@ sesSendEmail,

/**
* Helper function to identify a user by its sub, returning then its attributes.
*/
function cognitoGetUserBySub(AWS, accessKeyId, secretAccessKey, cognitoUserPoolId, sub, cb) {
new AWS.CognitoIdentityServiceProvider({
apiVersion: '2016-04-18', accessKeyId: accessKeyId, secretAccessKey: secretAccessKey
})
.listUsers({ UserPoolId: cognitoUserPoolId, Filter: `sub = "${sub}"`, Limit: 1},
(err, data) => {
if(err || !data || !data.Users || !data.Users[0]) return cb();
let userAttributes = [];
data.Users[0].Attributes.forEach(a => userAttributes[a.Name] = a.Value);
cb(userAttributes);
});
}
///

@@ -224,0 +240,0 @@ /// SES

2

package.json
{
"name": "idea-toolbox",
"version": "0.7.1",
"version": "0.8.0",
"description": "IDEA's utility functions",

@@ -5,0 +5,0 @@ "engines": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc