Skip to content

Instantly share code, notes, and snippets.

@abbaspour
Last active August 13, 2018 04:23
Show Gist options
  • Save abbaspour/2082929b3adabeaef06fe6d3855cce82 to your computer and use it in GitHub Desktop.
Save abbaspour/2082929b3adabeaef06fe6d3855cce82 to your computer and use it in GitHub Desktop.
Global Functions in Auth0 Rules
function (user, context, callback) {
if (!global.myFunc) {
global.myFunc = function (param) {
return true;
};
}
callback(null, user, context);
}
function (user, context, callback) {
var result = myFunc(user);
callback(null, user, context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment