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

@adastradev/user-management-sdk

Package Overview
Dependencies
Maintainers
19
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adastradev/user-management-sdk - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4-beta.1

2

dist/AuthManager.d.ts
import { ICognitoUserPoolLocator } from './ICognitoUserPoolLocator';
import * as AWS from 'aws-sdk';
import * as AWS from 'aws-sdk/global';
import { CognitoUserSession } from 'amazon-cognito-identity-js';

@@ -4,0 +4,0 @@ import { GlobalConfigInstance } from 'aws-sdk/lib/config';

@@ -38,3 +38,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var AWS = require("aws-sdk");
var AWS = require("aws-sdk/global");
var amazon_cognito_identity_js_1 = require("amazon-cognito-identity-js");

@@ -68,3 +68,3 @@ var proxy = require("proxy-agent");

return __awaiter(this, void 0, void 0, function () {
var _a, userPool, authenticationData, userData, authenticationDetails, that;
var _a, error_1, userPool, authenticationData, userData, authenticationDetails, that;
return __generator(this, function (_b) {

@@ -75,6 +75,14 @@ switch (_b.label) {

console.log("Signing into AWS Cognito");
_b.label = 1;
case 1:
_b.trys.push([1, 3, , 4]);
_a = this;
return [4 /*yield*/, this.locator.getPoolForUsername(email)];
case 1:
case 2:
_a.poolData = _b.sent();
return [3 /*break*/, 4];
case 3:
error_1 = _b.sent();
return [2 /*return*/, reject(error_1)];
case 4:
userPool = new amazon_cognito_identity_js_1.CognitoUserPool(this.poolData);

@@ -96,9 +104,9 @@ authenticationData = {

that.cognitoUserSession = result;
resolve(result);
return resolve(result);
},
onFailure: function (err) {
reject(err);
return reject(err);
},
mfaRequired: function (codeDeliveryDetails) {
reject(Error('Multi-factor auth is not currently supported'));
return reject(Error('Multi-factor auth is not currently supported'));
},

@@ -115,6 +123,6 @@ newPasswordRequired: function (userAttributes, requiredAttributes) {

that.cognitoUserSession = result;
resolve(result);
return resolve(result);
},
onFailure: function (err) {
reject(err);
return reject(err);
}

@@ -121,0 +129,0 @@ });

@@ -50,3 +50,3 @@ "use strict";

return __awaiter(this, void 0, void 0, function () {
var api, response, result;
var api, response, result, error_1;
return __generator(this, function (_a) {

@@ -56,4 +56,7 @@ switch (_a.label) {

api = new UserManagementApi_1.UserManagementApi(process.env.USER_MANAGEMENT_URI, this.region, { type: 'None' });
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, api.getUserPoolByUserName(userName)];
case 1:
case 2:
response = _a.sent();

@@ -66,3 +69,8 @@ result = {

resolve(result);
return [2 /*return*/];
return [3 /*break*/, 4];
case 3:
error_1 = _a.sent();
reject(error_1);
return [3 /*break*/, 4];
case 4: return [2 /*return*/];
}

@@ -69,0 +77,0 @@ });

{
"name": "@adastradev/user-management-sdk",
"version": "1.0.3",
"version": "1.0.4-beta.1",
"description": "Astra user management SDK for JavaScript in the browser and Node.js",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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