Socket
Socket
Sign inDemoInstall

amelisa-auth

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amelisa-auth - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

25

lib/api/verifyCallback.js

@@ -64,20 +64,25 @@ 'use strict';

profile.refreshToken = refreshToken;userId = req.session.userId;
_context.prev = 17;
_context.next = 20;
// Generate userId if absent
if (!userId) userId = model.id();
_context.prev = 18;
_context.next = 21;
return this.registerProvider(userId, profile.provider, profile);
case 20:
_context.next = 25;
case 21:
_context.next = 26;
break;
case 22:
_context.prev = 22;
_context.t1 = _context['catch'](17);
case 23:
_context.prev = 23;
_context.t1 = _context['catch'](18);
return _context.abrupt('return', done(_context.t1));
case 25:
case 26:
done(null, userId);
case 26:
case 27:
case 'end':

@@ -87,3 +92,3 @@ return _context.stop();

}
}, _callee, this, [[2, 7], [17, 22]]);
}, _callee, this, [[2, 7], [18, 23]]);
}));

@@ -90,0 +95,0 @@ return function verifyCallback(_x, _x2, _x3, _x4, _x5) {

6

lib/middleware/sessionMiddleware.js

@@ -32,6 +32,6 @@ 'use strict';

var userDoc = model.doc('auths', userId);
var $user = model.doc('auths', userId);
userDoc.fetch().then(function () {
var user = userDoc.get();
$user.fetch().then(function () {
var user = $user.get();

@@ -38,0 +38,0 @@ if (!user && isAuthenticated) {

@@ -93,3 +93,2 @@ 'use strict';

if (err) return reject(err);
// Everything is ok, login user

@@ -96,0 +95,0 @@ _this.login(userId, req).then(function () {

{
"name": "amelisa-auth",
"version": "0.1.3",
"version": "0.1.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.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