Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
var shortId = require('shortid');
var dynamoose = require('dynamoose');
var Schema = dynamoose.Schema;
var config = require('./config');
const AmazonCognitoIdentity = require('amazon-cognito-identity-js');
const CognitoUserPool = AmazonCognitoIdentity.CognitoUserPool;
const AWS = require('aws-sdk');
const request = require('request');
const jwkToPem = require('jwk-to-pem');
const jwt = require('jsonwebtoken');
// The amazon-cognito-identity-js uses fetch, which isn't in node.js core
global.fetch = require('node-fetch');
const poolData = {
UserPoolId: config.cognito.userPoolId,
ClientId : config.cognito.appClientId
};