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)) {