Clarification about supported APIs in Auth0 rules

Hi there,

I have some questions about Auth0 rules:

  1. Can I savely use “Promise” or is this not officially supported? It is available (verified by “console.log”), but your web editor highlights it as “undefined”, which doesn’t seem to be true.

  2. It is possible to require('bluebird') in a rule, but it isn’t listed here: https://auth0.com/docs/appliance/modules Is this officially supported?

  3. Do you consider switching rules to ES Modules? Currently a rule as documented in the docs isn’t valid JavaScript at all (no function name). You probably use it with some wrapper/templated function, but this makes tooling around rules harder.

You’ve likely seen it by now, but rules will soon use Node 8: http://community.auth0.com/t/auth0-extensibility-node-8-migration/10796

If you’ve signed up with a new account, perhaps you already have Node 8… you can check
console.log('Node version:', process.env.NODE_VERSION);

Thanks, yeah I saw that yesterday. So we can safely use Promise.

1 Like

That is correct, you should be good.