@feathersjs/authentication
Advanced tools
Comparing version 2.1.15 to 2.1.16
@@ -5,3 +5,3 @@ const Debug = require('debug'); | ||
module.exports = function emitEvents () { | ||
module.exports = function emitEvents (settings, _app) { | ||
return function (req, res, next) { | ||
@@ -19,3 +19,3 @@ const method = res.hook && res.hook.method; | ||
if (res.data && res.data.accessToken && event) { | ||
const { app } = req; | ||
const app = req.app && typeof req.app.emit === 'function' ? req.app : _app; | ||
@@ -22,0 +22,0 @@ debug(`Sending '${event}' event for REST provider. Token is`, res.data.accessToken); |
@@ -63,3 +63,3 @@ const Debug = require('debug'); | ||
new Service(app, options), | ||
emitEvents(options), | ||
emitEvents(options, app), | ||
setCookie(options), | ||
@@ -66,0 +66,0 @@ successRedirect(), |
{ | ||
"name": "@feathersjs/authentication", | ||
"description": "Add Authentication to your FeathersJS app.", | ||
"version": "2.1.15", | ||
"version": "2.1.16", | ||
"homepage": "https://feathersjs.com", | ||
@@ -53,3 +53,3 @@ "main": "lib/", | ||
"devDependencies": { | ||
"@feathersjs/authentication-jwt": "^2.0.9", | ||
"@feathersjs/authentication-jwt": "^2.0.10", | ||
"@feathersjs/authentication-local": "^1.2.9", | ||
@@ -64,3 +64,3 @@ "@feathersjs/configuration": "^2.0.6", | ||
"chai-uuid": "^1.0.6", | ||
"feathers-memory": "^2.0.0", | ||
"feathers-memory": "^3.0.0", | ||
"jshint": "^2.9.3", | ||
@@ -73,3 +73,3 @@ "localstorage-memory": "^1.0.2", | ||
"primus": "^7.0.0", | ||
"sinon": "^6.0.0", | ||
"sinon": "^7.2.3", | ||
"sinon-chai": "^3.0.0", | ||
@@ -80,3 +80,3 @@ "socket.io-client": "^2.0.0", | ||
}, | ||
"gitHead": "8c3a740ada9c9a0a25204d72f8ce982ad2887331" | ||
"gitHead": "2a6dc7019926fb92840045e904c7b9ac61c4c9ea" | ||
} |
Sorry, the diff of this file is too big to display
389524