From af2a1784b0e2333c5fc0ce15afb73bf7107b26fd Mon Sep 17 00:00:00 2001 From: Eric Kryski Date: Wed, 23 Mar 2016 18:39:46 -0600 Subject: [PATCH] Merge pull request #117 from feathersjs/allow-user-id-of-0 Allow user.id to be 0. Fixes #116 --- packages/authentication/src/services/token/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/authentication/src/services/token/index.js b/packages/authentication/src/services/token/index.js index c10ce99b34..51fed32087 100644 --- a/packages/authentication/src/services/token/index.js +++ b/packages/authentication/src/services/token/index.js @@ -94,7 +94,7 @@ export class Service { const options = this.options; const data = { - id: user[options.idField] || user.id + id: user.hasOwnProperty(options.idField) ? user[options.idField] : user.id }; if (Array.isArray(options.extraFields)) {