feat: Add conditional email verification via dynamic Parse Server options verifyUserEmails, sendUserEmailVerification that now accept functions (#8425)

This commit is contained in:
Daniel
2023-06-20 20:10:25 +10:00
committed by GitHub
parent 3710da7379
commit 44acd6d9ed
11 changed files with 341 additions and 82 deletions

View File

@@ -496,6 +496,12 @@ module.exports.ParseServerOptions = {
action: parsers.objectParser,
default: {},
},
sendUserEmailVerification: {
env: 'PARSE_SERVER_SEND_USER_EMAIL_VERIFICATION',
help:
'Set to `false` to prevent sending of verification email. Supports a function with a return value of `true` or `false` for conditional email sending.<br><br>Default is `true`.<br>',
default: true,
},
serverCloseComplete: {
env: 'PARSE_SERVER_SERVER_CLOSE_COMPLETE',
help: 'Callback when server has closed',
@@ -542,8 +548,7 @@ module.exports.ParseServerOptions = {
verifyUserEmails: {
env: 'PARSE_SERVER_VERIFY_USER_EMAILS',
help:
'Set to `true` to require users to verify their email address to complete the sign-up process.<br><br>Default is `false`.',
action: parsers.booleanParser,
'Set to `true` to require users to verify their email address to complete the sign-up process. Supports a function with a return value of `true` or `false` for conditional verification.<br><br>Default is `false`.',
default: false,
},
webhookKey: {