Created
August 4, 2016 09:36
-
-
Save sandrinodimattia/a62ae52643122391f15213ca4284bf4c to your computer and use it in GitHub Desktop.
Promises and Node version in Auth0 Rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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