@feathersjs/authentication
Advanced tools
Comparing version 4.3.2 to 4.3.3
@@ -37,4 +37,5 @@ "use strict"; | ||
connection.authentication.accessToken === authResult.accessToken; | ||
if (authResult && event === 'login') { | ||
const { accessToken } = authResult; | ||
const { accessToken } = authResult || {}; | ||
if (accessToken && event === 'login') { | ||
debug('Adding authentication information to connection'); | ||
const { exp } = yield this.authentication.verifyAccessToken(accessToken); | ||
@@ -41,0 +42,0 @@ // The time (in ms) until the token expires |
@@ -83,2 +83,5 @@ "use strict"; | ||
debug('Got authentication result', authResult); | ||
if (authResult.accessToken) { | ||
return authResult; | ||
} | ||
const [payload, jwtOptions] = yield Promise.all([ | ||
@@ -88,5 +91,2 @@ this.getPayload(authResult, params), | ||
]); | ||
if (authResult.accessToken) { | ||
return authResult; | ||
} | ||
debug('Creating JWT with', payload, jwtOptions); | ||
@@ -93,0 +93,0 @@ const accessToken = yield this.createAccessToken(payload, jwtOptions, params.secret); |
{ | ||
"name": "@feathersjs/authentication", | ||
"description": "Add Authentication to your FeathersJS app.", | ||
"version": "4.3.2", | ||
"version": "4.3.3", | ||
"homepage": "https://feathersjs.com", | ||
@@ -42,4 +42,5 @@ "main": "lib/", | ||
"dependencies": { | ||
"@feathersjs/errors": "^4.3.2", | ||
"@feathersjs/transport-commons": "^4.3.2", | ||
"@feathersjs/errors": "^4.3.3", | ||
"@feathersjs/feathers": "^4.3.3", | ||
"@feathersjs/transport-commons": "^4.3.3", | ||
"debug": "^4.1.1", | ||
@@ -52,3 +53,2 @@ "jsonwebtoken": "^8.5.1", | ||
"devDependencies": { | ||
"@feathersjs/feathers": "^4.3.2", | ||
"@types/debug": "^4.1.5", | ||
@@ -66,3 +66,3 @@ "@types/jsonwebtoken": "^8.3.3", | ||
}, | ||
"gitHead": "31c8e752298f725e3be9965ce1550e94e09ec871" | ||
"gitHead": "352e422a30c8b289ca047862d997a49b427553a9" | ||
} |
@@ -35,4 +35,6 @@ import Debug from 'debug'; | ||
if (authResult && event === 'login') { | ||
const { accessToken } = authResult; | ||
const { accessToken } = authResult || {}; | ||
if (accessToken && event === 'login') { | ||
debug('Adding authentication information to connection'); | ||
const { exp } = await this.authentication.verifyAccessToken(accessToken); | ||
@@ -39,0 +41,0 @@ // The time (in ms) until the token expires |
@@ -95,2 +95,6 @@ import Debug from 'debug'; | ||
if (authResult.accessToken) { | ||
return authResult; | ||
} | ||
const [ payload, jwtOptions ] = await Promise.all([ | ||
@@ -101,6 +105,2 @@ this.getPayload(authResult, params), | ||
if (authResult.accessToken) { | ||
return authResult; | ||
} | ||
debug('Creating JWT with', payload, jwtOptions); | ||
@@ -107,0 +107,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
661991
11
2513
8
+ Added@feathersjs/feathers@^4.3.3
+ Added@feathersjs/feathers@4.5.17(transitive)
+ Addedevents@3.3.0(transitive)
+ Addeduberproto@2.0.6(transitive)
Updated@feathersjs/errors@^4.3.3