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

@accounts/server

Package Overview
Dependencies
Maintainers
5
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accounts/server - npm Package Compare versions

Comparing version 0.1.0-alpha.357173dd to 0.1.0-alpha.4170db8f

8

lib/accounts-server.js

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

return __awaiter(this, void 0, void 0, function () {
var user, resetTokens, resetTokenRecord, emails, password;
var user, resetTokens, asArray, resetTokenRecord, emails, tokenAddress, password;
return __generator(this, function (_a) {

@@ -571,3 +571,4 @@ switch (_a.label) {

resetTokens = get(user, ['services', 'password', 'reset']) || [];
resetTokenRecord = (isArray(resetTokens) ? resetTokens : [resetTokens]).find(resetTokens, function (t) { return t.token === token; });
asArray = isArray(resetTokens) ? resetTokens : [resetTokens];
resetTokenRecord = find(asArray, function (t) { return t.token === token; });
if (this._isTokenExpired(token, resetTokenRecord)) {

@@ -577,3 +578,4 @@ throw new common_1.AccountsError('Reset password link expired');

emails = user.emails || [];
if (!includes(emails.map(function (email) { return email.address; }), resetTokenRecord.address)) {
tokenAddress = resetTokenRecord.email || resetTokenRecord.address;
if (!includes(emails.map(function (email) { return email.address; }), tokenAddress)) {
throw new common_1.AccountsError('Token has invalid email address');

@@ -580,0 +582,0 @@ }

{
"name": "@accounts/server",
"version": "0.1.0-alpha.357173dd",
"version": "0.1.0-alpha.4170db8f",
"description": "Fullstack authentication and accounts-management",

@@ -50,3 +50,2 @@ "main": "lib/index.js",

"dependencies": {
"@accounts/common": "^0.1.0-alpha.357173dd",
"babel-polyfill": "^6.23.0",

@@ -60,3 +59,7 @@ "bcryptjs": "^2.4.0",

},
"peerDependencies": {
"@accounts/common": "^0.1.0-alpha.4170db8f"
},
"devDependencies": {
"@accounts/common": "^0.1.0-alpha.4170db8f",
"coveralls": "^2.11.14",

@@ -63,0 +66,0 @@ "jest": "^18.0.0",

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