Skip to content

Instantly share code, notes, and snippets.

@sandrinodimattia
Created August 4, 2016 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandrinodimattia/a62ae52643122391f15213ca4284bf4c to your computer and use it in GitHub Desktop.
Save sandrinodimattia/a62ae52643122391f15213ca4284bf4c to your computer and use it in GitHub Desktop.
Promises and Node version in Auth0 Rules
function (user, context, callback) {
var Promise = require('bluebird');
Promise.resolve('foo')
.then(function(result) {
console.log('Node version:', process.env.NODE_VERSION);
console.log('Promise result:', result);
callback(null, user, context);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment