Skip to content

Commit a22dbe1

Browse files
authored
feat: Add installationId to arguments for verifyUserEmails, preventLoginWithUnverifiedEmail (#8836)
1 parent 2c2563e commit a22dbe1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

spec/EmailVerificationToken.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ describe('Email Verification Token Expiration: ', () => {
299299
};
300300
const verifyUserEmails = {
301301
method(req) {
302-
expect(Object.keys(req)).toEqual(['original', 'object', 'master', 'ip']);
302+
expect(Object.keys(req)).toEqual(['original', 'object', 'master', 'ip', 'installationId']);
303303
return false;
304304
},
305305
};
@@ -358,7 +358,7 @@ describe('Email Verification Token Expiration: ', () => {
358358
};
359359
const verifyUserEmails = {
360360
method(req) {
361-
expect(Object.keys(req)).toEqual(['original', 'object', 'master', 'ip']);
361+
expect(Object.keys(req)).toEqual(['original', 'object', 'master', 'ip', 'installationId']);
362362
if (req.object.get('username') === 'no_email') {
363363
return false;
364364
}

src/RestWrite.js

+2
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,7 @@ RestWrite.prototype._validateEmail = function () {
804804
object: updatedObject,
805805
master: this.auth.isMaster,
806806
ip: this.config.ip,
807+
installationId: this.auth.installationId,
807808
};
808809
return this.config.userController.setEmailVerifyToken(this.data, request, this.storage);
809810
}
@@ -947,6 +948,7 @@ RestWrite.prototype.createSessionTokenIfNeeded = async function () {
947948
object: updatedObject,
948949
master: this.auth.isMaster,
949950
ip: this.config.ip,
951+
installationId: this.auth.installationId,
950952
};
951953
shouldPreventUnverifedLogin = await Promise.resolve(
952954
this.config.preventLoginWithUnverifiedEmail(request)

0 commit comments

Comments
 (0)