MCPcopy Index your code
hub / github.com/strongloop/loopback / assertVerifyOptions

Function assertVerifyOptions

common/models/user.js:861–873  ·  view source on GitHub ↗
(verifyOptions)

Source from the content-addressed store, hash-verified

859 };
860
861 function assertVerifyOptions(verifyOptions) {
862 assert(verifyOptions.type, 'You must supply a verification type (verifyOptions.type)');
863 assert(verifyOptions.type === 'email', 'Unsupported verification type');
864 assert(verifyOptions.to, 'Must include verifyOptions.to when calling user.verify() ' +
865 'or the user must have an email property');
866 assert(verifyOptions.from, 'Must include verifyOptions.from when calling user.verify()');
867 assert(typeof verifyOptions.templateFn === 'function',
868 'templateFn must be a function');
869 assert(typeof verifyOptions.generateVerificationToken === 'function',
870 'generateVerificationToken must be a function');
871 assert(verifyOptions.mailer, 'A mailer function must be provided');
872 assert(typeof verifyOptions.mailer.send === 'function', 'mailer.send must be a function ');
873 }
874
875 function createVerificationEmailBody(verifyOptions, options, cb) {
876 const template = loopback.template(verifyOptions.template);

Callers 1

user.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…