New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cognito-local

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cognito-local - npm Package Compare versions

Comparing version 3.23.0 to 3.23.1

5

lib/errors.d.ts

@@ -8,3 +8,3 @@ export declare class UnsupportedError extends Error {

export declare class NotAuthorizedError extends CognitoError {
constructor();
constructor(message?: string);
}

@@ -20,2 +20,5 @@ export declare class UserNotFoundError extends CognitoError {

}
export declare class ExpiredCodeError extends CognitoError {
constructor();
}
export declare class InvalidPasswordError extends CognitoError {

@@ -22,0 +25,0 @@ constructor();

11

lib/errors.js

@@ -11,2 +11,3 @@ var __defProp = Object.defineProperty;

CognitoError: () => CognitoError,
ExpiredCodeError: () => ExpiredCodeError,
GroupNotFoundError: () => GroupNotFoundError,

@@ -34,4 +35,4 @@ InvalidLambdaResponseError: () => InvalidLambdaResponseError,

class NotAuthorizedError extends CognitoError {
constructor() {
super("NotAuthorizedException", "User not authorized");
constructor(message = "User not authorized") {
super("NotAuthorizedException", message);
}

@@ -54,2 +55,7 @@ }

}
class ExpiredCodeError extends CognitoError {
constructor() {
super("ExpiredCodeException", "Invalid code provided, please request a code again.");
}
}
class InvalidPasswordError extends CognitoError {

@@ -99,2 +105,3 @@ constructor() {

CognitoError,
ExpiredCodeError,
GroupNotFoundError,

@@ -101,0 +108,0 @@ InvalidLambdaResponseError,

@@ -56,2 +56,5 @@ var __create = Object.create;

}
if (user.UserStatus !== "UNCONFIRMED") {
throw new import_errors.NotAuthorizedError(`User cannot be confirmed. Current status is ${user.UserStatus}`);
}
const updatedUser = __spreadProps(__spreadValues({}, user), {

@@ -58,0 +61,0 @@ UserLastModifiedDate: clock.get(),

@@ -56,2 +56,5 @@ var __create = Object.create;

}
if (!user.ConfirmationCode) {
throw new import_errors.ExpiredCodeError();
}
if (user.ConfirmationCode !== req.ConfirmationCode) {

@@ -58,0 +61,0 @@ throw new import_errors.CodeMismatchError();

{
"name": "cognito-local",
"version": "3.23.0",
"version": "3.23.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "bin": "lib/bin/start.js",

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