Name: zerocrm-middleware
Owner: Auth0
Description: Middleware for the Auth0 Extend ZERO CRM sample
Created: 2017-10-24 18:06:17.0
Updated: 2017-10-24 19:10:14.0
Pushed: 2017-10-24 19:49:10.0
Homepage: null
Size: 7
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Middleware for the Auth0 Extend ZERO CRM sample
This middleware offers a custom programming model for the ZERO CRM application. It allows users to author extensions using a programming model of: function (lead, cb)
and to access secrets globally.
Here is example illustrating using the Clearbit SDK to look up a lead.
clearbit = require('clearbit')(module.exports.secrets.clearbit_key);
le.exports = function(lead, cb) {
nsole.log(lead.email);
r Person = clearbit.Person;
rson.find({email: lead.email}).
then(person=> {
lead.github = person.github.handle;
lead.twitter = person.twitter.handle;
lead.linkedin = person.linkedin.handle;
console.log(lead);
cb(null, lead);
});
Apache 2.0