diff --git a/spec/EmailVerificationToken.spec.js b/spec/EmailVerificationToken.spec.js index a7a59b893e..8501655143 100644 --- a/spec/EmailVerificationToken.spec.js +++ b/spec/EmailVerificationToken.spec.js @@ -299,7 +299,7 @@ describe('Email Verification Token Expiration: ', () => { }; const verifyUserEmails = { method(req) { - expect(Object.keys(req)).toEqual(['original', 'object', 'master', 'ip']); + expect(Object.keys(req)).toEqual(['original', 'object', 'master', 'ip', 'installationId']); return false; }, }; @@ -358,7 +358,7 @@ describe('Email Verification Token Expiration: ', () => { }; const verifyUserEmails = { method(req) { - expect(Object.keys(req)).toEqual(['original', 'object', 'master', 'ip']); + expect(Object.keys(req)).toEqual(['original', 'object', 'master', 'ip', 'installationId']); if (req.object.get('username') === 'no_email') { return false; } diff --git a/src/RestWrite.js b/src/RestWrite.js index 1f640b4fd4..bbcc127f05 100644 --- a/src/RestWrite.js +++ b/src/RestWrite.js @@ -804,6 +804,7 @@ RestWrite.prototype._validateEmail = function () { object: updatedObject, master: this.auth.isMaster, ip: this.config.ip, + installationId: this.auth.installationId, }; return this.config.userController.setEmailVerifyToken(this.data, request, this.storage); } @@ -947,6 +948,7 @@ RestWrite.prototype.createSessionTokenIfNeeded = async function () { object: updatedObject, master: this.auth.isMaster, ip: this.config.ip, + installationId: this.auth.installationId, }; shouldPreventUnverifedLogin = await Promise.resolve( this.config.preventLoginWithUnverifiedEmail(request)